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:
Chao Wang
2017-11-10 13:18:48 +08:00
parent 32672a8e2b
commit 98da414257
7 changed files with 49 additions and 47 deletions

View File

@ -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 := ""