summaryrefslogtreecommitdiff
path: root/complete_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'complete_test.go')
-rw-r--r--complete_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/complete_test.go b/complete_test.go
index ba4df4a..cd7880c 100644
--- a/complete_test.go
+++ b/complete_test.go
@@ -144,14 +144,30 @@ func TestCompleter_Complete(t *testing.T) {
want: []string{"./a.txt", "./b.txt", "./c.txt", "./.dot.txt", "./", "./dir/", "./outer/"},
},
{
+ args: "-o=./",
+ want: []string{"./a.txt", "./b.txt", "./c.txt", "./.dot.txt", "./", "./dir/", "./outer/"},
+ },
+ {
args: "-o .",
want: []string{"./a.txt", "./b.txt", "./c.txt", "./.dot.txt", "./", "./dir/", "./outer/"},
},
{
+ args: "-o ./b",
+ want: []string{"./b.txt"},
+ },
+ {
+ args: "-o=./b",
+ want: []string{"./b.txt"},
+ },
+ {
args: "-o ./read",
want: []string{},
},
{
+ args: "-o=./read",
+ want: []string{},
+ },
+ {
args: "-o ./readme.md",
want: []string{},
},
@@ -160,6 +176,10 @@ func TestCompleter_Complete(t *testing.T) {
want: []string{"sub1", "sub2"},
},
{
+ args: "-o=./readme.md ",
+ want: []string{"sub1", "sub2"},
+ },
+ {
args: "-o sub2 -flag3 ",
want: []string{"opt1", "opt2", "opt12"},
},