|
1
|
package testutils |
|
2
|
|
|
3
|
import ( |
|
4
|
"strings" |
|
5
|
"testing" |
|
6
|
) |
|
7
|
|
|
8
|
func AssertStringContainsOneOf(t *testing.T, str string, ss ...string) { |
|
9
|
for _, s := range ss { |
|
10
|
if strings.Contains(str, s) { |
|
11
|
return |
|
12
|
} |
|
13
|
} |
|
14
|
t.Errorf("%q does not contain one of %v", str, ss) |
|
15
|
} |