summaryrefslogtreecommitdiff
path: root/cli_args_test.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2023-05-03 21:14:53 +0200
committerJakob Unterwurzacher2023-05-03 21:14:53 +0200
commitaa1d8a0f90a1046b89dfdd9e58fb1407c76ff27e (patch)
tree00277726372da29d5988486fcccbfcaade4f8ef8 /cli_args_test.go
parent6c14d25d442a819bf37e228d936e6a2a05de747d (diff)
cli: don't split multiple-strings flags on comma
Looks like I used StringSliceVar (which splits on comma) where I should have always used StringArrayVar (which does not). Bug report contains this example of misbehavoir: #gocryptfs -extpass 'echo abc,123' -init testdir Reading password from extpass program "echo abc", arguments: ["123"] extpass cmd start failed: exec: "echo abc": executable file not found in $PATH Fixes https://github.com/rfjakob/gocryptfs/issues/730
Diffstat (limited to 'cli_args_test.go')
-rw-r--r--cli_args_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cli_args_test.go b/cli_args_test.go
index 3220196..4fb01ac 100644
--- a/cli_args_test.go
+++ b/cli_args_test.go
@@ -157,13 +157,13 @@ func TestParseCliOpts(t *testing.T) {
}...)
o = defaultArgs
- o.exclude = []string{"foo", "bar"}
+ o.exclude = []string{"foo", "bar", "baz,boe"}
testcases = append(testcases, []testcaseContainer{
{
- i: []string{"gocryptfs", "-e", "foo", "-e", "bar"},
+ i: []string{"gocryptfs", "-e", "foo", "-e", "bar", "-e", "baz,boe"},
o: o,
}, {
- i: []string{"gocryptfs", "--exclude", "foo", "--exclude", "bar"},
+ i: []string{"gocryptfs", "--exclude", "foo", "--exclude", "bar", "--exclude", "baz,boe"},
o: o,
}, /* TODO BROKEN {
i: []string{"gocryptfs", "--exclude", "foo", "-e", "bar"},