github.com/opendevstack/tailor@v1.3.5-0.20220119161809-cab064e60a67/pkg/utils/string_test.go (about) 1 package utils 2 3 import "testing" 4 5 func TestIncludes(t *testing.T) { 6 if !Includes([]string{"foo", "bar"}, "foo") { 7 t.Errorf("foo is included") 8 } 9 if !Includes([]string{"foo", "bar"}, "bar") { 10 t.Errorf("bar is included") 11 } 12 if Includes([]string{"foo", "bar"}, "baz") { 13 t.Errorf("baz is not included") 14 } 15 }