Skip to content

Commit 240601a

Browse files
fix unix tests under windows
1 parent 0879084 commit 240601a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

shell/split_arguments_test.go

+6
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ func TestSplitArguments(t *testing.T) {
1212
commandLine string
1313
expectedArgs []string
1414
windowsMode bool
15+
unixMode bool
1516
}{
1617
{
1718
commandLine: `cmd arg1 arg2`,
@@ -44,10 +45,12 @@ func TestSplitArguments(t *testing.T) {
4445
{
4546
commandLine: `cmd "arg \"with\" spaces"`,
4647
expectedArgs: []string{"cmd", "arg \"with\" spaces"},
48+
unixMode: true,
4749
},
4850
{
4951
commandLine: `cmd arg\ with\ spaces`,
5052
expectedArgs: []string{"cmd", "arg with spaces"},
53+
unixMode: true,
5154
},
5255
{
5356
commandLine: `args --with folder/file.txt`,
@@ -64,6 +67,9 @@ func TestSplitArguments(t *testing.T) {
6467
if testCase.windowsMode && !platform.IsWindows() {
6568
continue
6669
}
70+
if testCase.unixMode && platform.IsWindows() {
71+
continue
72+
}
6773
t.Run(testCase.commandLine, func(t *testing.T) {
6874
args := SplitArguments(testCase.commandLine)
6975
assert.Equal(t, testCase.expectedArgs, args)

0 commit comments

Comments
 (0)