@@ -21,32 +21,6 @@ import (
2121 "gotest.tools/v3/assert"
2222)
2323
24- func TestStringSliceReplaceAt (t * testing.T ) {
25- out , ok := command .StringSliceReplaceAt ([]string {"abc" , "foo" , "bar" , "bax" }, []string {"foo" , "bar" }, []string {"baz" }, - 1 )
26- assert .Assert (t , ok )
27- assert .DeepEqual (t , []string {"abc" , "baz" , "bax" }, out )
28-
29- out , ok = command .StringSliceReplaceAt ([]string {"foo" }, []string {"foo" , "bar" }, []string {"baz" }, - 1 )
30- assert .Assert (t , ! ok )
31- assert .DeepEqual (t , []string {"foo" }, out )
32-
33- out , ok = command .StringSliceReplaceAt ([]string {"abc" , "foo" , "bar" , "bax" }, []string {"foo" , "bar" }, []string {"baz" }, 0 )
34- assert .Assert (t , ! ok )
35- assert .DeepEqual (t , []string {"abc" , "foo" , "bar" , "bax" }, out )
36-
37- out , ok = command .StringSliceReplaceAt ([]string {"foo" , "bar" , "bax" }, []string {"foo" , "bar" }, []string {"baz" }, 0 )
38- assert .Assert (t , ok )
39- assert .DeepEqual (t , []string {"baz" , "bax" }, out )
40-
41- out , ok = command .StringSliceReplaceAt ([]string {"abc" , "foo" , "bar" , "baz" }, []string {"foo" , "bar" }, nil , - 1 )
42- assert .Assert (t , ok )
43- assert .DeepEqual (t , []string {"abc" , "baz" }, out )
44-
45- out , ok = command .StringSliceReplaceAt ([]string {"foo" }, nil , []string {"baz" }, - 1 )
46- assert .Assert (t , ! ok )
47- assert .DeepEqual (t , []string {"foo" }, out )
48- }
49-
5024func TestValidateOutputPath (t * testing.T ) {
5125 basedir := t .TempDir ()
5226 dir := filepath .Join (basedir , "dir" )
0 commit comments