File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ func TestSplitArguments(t *testing.T) {
12
12
commandLine string
13
13
expectedArgs []string
14
14
windowsMode bool
15
+ unixMode bool
15
16
}{
16
17
{
17
18
commandLine : `cmd arg1 arg2` ,
@@ -44,10 +45,12 @@ func TestSplitArguments(t *testing.T) {
44
45
{
45
46
commandLine : `cmd "arg \"with\" spaces"` ,
46
47
expectedArgs : []string {"cmd" , "arg \" with\" spaces" },
48
+ unixMode : true ,
47
49
},
48
50
{
49
51
commandLine : `cmd arg\ with\ spaces` ,
50
52
expectedArgs : []string {"cmd" , "arg with spaces" },
53
+ unixMode : true ,
51
54
},
52
55
{
53
56
commandLine : `args --with folder/file.txt` ,
@@ -64,6 +67,9 @@ func TestSplitArguments(t *testing.T) {
64
67
if testCase .windowsMode && ! platform .IsWindows () {
65
68
continue
66
69
}
70
+ if testCase .unixMode && platform .IsWindows () {
71
+ continue
72
+ }
67
73
t .Run (testCase .commandLine , func (t * testing.T ) {
68
74
args := SplitArguments (testCase .commandLine )
69
75
assert .Equal (t , testCase .expectedArgs , args )
You can’t perform that action at this time.
0 commit comments