diff options
Diffstat (limited to 'cli_args_test.go')
-rw-r--r-- | cli_args_test.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cli_args_test.go b/cli_args_test.go index 844a0b1..e1ed435 100644 --- a/cli_args_test.go +++ b/cli_args_test.go @@ -39,14 +39,23 @@ func TestPrefixOArgs(t *testing.T) { o: []string{"gocryptfs", "-a", "-b", "-xxxxx", "foo", "bar"}, }, testcase{ + i: []string{"gocryptfs", "foo", "bar", "-d", "-o=a,b,xxxxx"}, + o: []string{"gocryptfs", "-a", "-b", "-xxxxx", "foo", "bar", "-d"}, + }, + testcase{ i: []string{"gocryptfs", "foo", "bar", "-oooo", "a,b,xxxxx"}, o: []string{"gocryptfs", "foo", "bar", "-oooo", "a,b,xxxxx"}, }, + // https://github.com/mhogomchungu/sirikali/blob/a36d91d3e39f0c1eb9a79680ed6c28ddb6568fa8/src/siritask.cpp#L192 + testcase{ + i: []string{"gocryptfs", "-o", "rw", "--config", "fff", "ccc", "mmm"}, + o: []string{"gocryptfs", "-rw", "--config", "fff", "ccc", "mmm"}, + }, } for _, tc := range testcases { o := prefixOArgs(tc.i) if !reflect.DeepEqual(o, tc.o) { - t.Errorf("\n i=%q\nwant=%q\n got=%q", tc.i, tc.o, o) + t.Errorf("\n in=%q\nwant=%q\n got=%q", tc.i, tc.o, o) } } } |