@@ -41,18 +41,28 @@ func All(comparators ...test.Comparator) test.Comparator {
41
41
42
42
// Contains can be used as a parameter for expected.Output and ensures a comparison string is found contained in the
43
43
// output.
44
- func Contains (compare string ) test.Comparator {
44
+ func Contains (compare string , more ... string ) test.Comparator {
45
45
return func (stdout , _ string , t * testing.T ) {
46
46
t .Helper ()
47
+
47
48
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
+ }
48
53
}
49
54
}
50
55
51
56
// 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 {
53
58
return func (stdout , _ string , t * testing.T ) {
54
59
t .Helper ()
60
+
55
61
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
+ }
56
66
}
57
67
}
58
68
0 commit comments