From 240601a429fb614de57f0904ca0713e632195dc2 Mon Sep 17 00:00:00 2001 From: Fred Date: Wed, 13 Nov 2024 21:35:19 +0000 Subject: [PATCH] fix unix tests under windows --- shell/split_arguments_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shell/split_arguments_test.go b/shell/split_arguments_test.go index cc55ffe5..94838bbd 100644 --- a/shell/split_arguments_test.go +++ b/shell/split_arguments_test.go @@ -12,6 +12,7 @@ func TestSplitArguments(t *testing.T) { commandLine string expectedArgs []string windowsMode bool + unixMode bool }{ { commandLine: `cmd arg1 arg2`, @@ -44,10 +45,12 @@ func TestSplitArguments(t *testing.T) { { commandLine: `cmd "arg \"with\" spaces"`, expectedArgs: []string{"cmd", "arg \"with\" spaces"}, + unixMode: true, }, { commandLine: `cmd arg\ with\ spaces`, expectedArgs: []string{"cmd", "arg with spaces"}, + unixMode: true, }, { commandLine: `args --with folder/file.txt`, @@ -64,6 +67,9 @@ func TestSplitArguments(t *testing.T) { if testCase.windowsMode && !platform.IsWindows() { continue } + if testCase.unixMode && platform.IsWindows() { + continue + } t.Run(testCase.commandLine, func(t *testing.T) { args := SplitArguments(testCase.commandLine) assert.Equal(t, testCase.expectedArgs, args)