mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 18:01:01 -06:00
19 lines
344 B
Go
19 lines
344 B
Go
|
package terraform
|
||
|
|
||
|
import "testing"
|
||
|
|
||
|
func TestStrSliceContains(t *testing.T) {
|
||
|
if strSliceContains(nil, "foo") {
|
||
|
t.Fatalf("Bad")
|
||
|
}
|
||
|
if strSliceContains([]string{}, "foo") {
|
||
|
t.Fatalf("Bad")
|
||
|
}
|
||
|
if strSliceContains([]string{"bar"}, "foo") {
|
||
|
t.Fatalf("Bad")
|
||
|
}
|
||
|
if !strSliceContains([]string{"bar", "foo"}, "foo") {
|
||
|
t.Fatalf("Bad")
|
||
|
}
|
||
|
}
|