Copy Inslice() to those parts that use it
Signed-off-by: Chao Wang <wangchao.fnst@cn.fujitsu.com> Upstream-commit: 5c154cfac89305f7ca9446854e56700e8a660f93 Component: engine
This commit is contained in:
@ -77,23 +77,6 @@ func TestTruncate(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestInSlice(t *testing.T) {
|
||||
slice := []string{"t🐳st", "in", "slice"}
|
||||
|
||||
test := InSlice(slice, "t🐳st")
|
||||
if !test {
|
||||
t.Fatalf("Expected string t🐳st to be in slice")
|
||||
}
|
||||
test = InSlice(slice, "SLICE")
|
||||
if !test {
|
||||
t.Fatalf("Expected string SLICE to be in slice")
|
||||
}
|
||||
test = InSlice(slice, "notinslice")
|
||||
if test {
|
||||
t.Fatalf("Expected string notinslice not to be in slice")
|
||||
}
|
||||
}
|
||||
|
||||
func TestShellQuoteArgumentsEmpty(t *testing.T) {
|
||||
actual := ShellQuoteArguments([]string{})
|
||||
expected := ""
|
||||
|
||||
Reference in New Issue
Block a user