aboutsummaryrefslogtreecommitdiff
path: root/lib/os/exec/exec_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/os/exec/exec_test.go')
-rw-r--r--lib/os/exec/exec_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/os/exec/exec_test.go b/lib/os/exec/exec_test.go
index 90771dbb..38e089d0 100644
--- a/lib/os/exec/exec_test.go
+++ b/lib/os/exec/exec_test.go
@@ -41,6 +41,18 @@ func TestParseCommandArg(t *testing.T) {
in: "a `b'c`",
expCmd: `a`,
expArgs: []string{`b'c`},
+ }, {
+ in: `a\ b c\ d`,
+ expCmd: "a b",
+ expArgs: []string{"c d"},
+ }, {
+ in: `a\\ b c\\ d`,
+ expCmd: `a\`,
+ expArgs: []string{"b", `c\`, "d"},
+ }, {
+ in: `a\\\ b c\\\ d`,
+ expCmd: `a\ b`,
+ expArgs: []string{`c\ d`},
}}
for _, c := range cases {