@@ -41,18 +41,28 @@ func All(comparators ...test.Comparator) test.Comparator {
4141
4242// Contains can be used as a parameter for expected.Output and ensures a comparison string is found contained in the
4343// output.
44- func Contains (compare string ) test.Comparator {
44+ func Contains (compare string , more ... string ) test.Comparator {
4545 return func (stdout , _ string , t * testing.T ) {
4646 t .Helper ()
47+
4748 assertive .Contains (assertive .WithFailLater (t ), stdout , compare , "Inspecting output (contains)" )
49+
50+ for _ , m := range more {
51+ assertive .Contains (assertive .WithFailLater (t ), stdout , m , "Inspecting output (contains)" )
52+ }
4853 }
4954}
5055
5156// DoesNotContain is to be used for expected.Output to ensure a comparison string is NOT found in the output.
52- func DoesNotContain (compare string ) test.Comparator {
57+ func DoesNotContain (compare string , more ... string ) test.Comparator {
5358 return func (stdout , _ string , t * testing.T ) {
5459 t .Helper ()
60+
5561 assertive .DoesNotContain (assertive .WithFailLater (t ), stdout , compare , "Inspecting output (does not contain)" )
62+
63+ for _ , m := range more {
64+ assertive .DoesNotContain (assertive .WithFailLater (t ), stdout , m , "Inspecting output (does not contain)" )
65+ }
5666 }
5767}
5868
0 commit comments