diff options
| author | Eyal Posener <[email protected]> | 2017-05-11 21:57:44 +0300 |
|---|---|---|
| committer | Eyal Posener <[email protected]> | 2017-05-11 21:57:44 +0300 |
| commit | d6cbc0e9690035368477b3ed8aa22aece0381b77 (patch) | |
| tree | 44d4e90b2b54a50e2f468f195410419e497daa66 /complete_test.go | |
| parent | 7b1b902128e784fdf6ddeeb2347417f091fc8dc5 (diff) | |
predict: when searching for files, show also directories
Diffstat (limited to 'complete_test.go')
| -rw-r--r-- | complete_test.go | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/complete_test.go b/complete_test.go index ee5a133..c9d544b 100644 --- a/complete_test.go +++ b/complete_test.go @@ -23,7 +23,7 @@ func TestCompleter_Complete(t *testing.T) { "-flag2": PredictNothing, "-flag3": PredictSet("opt1", "opt2", "opt12"), }, - Args: PredictOr(PredictDirs("*"), PredictFiles("*.md")), + Args: PredictFiles("*.md"), }, }, Flags: map[string]Predictor{ @@ -129,7 +129,7 @@ func TestCompleter_Complete(t *testing.T) { }, { args: "-o ", - want: testTXTFiles, + want: append(testTXTFiles, "./", "./dir/"), }, { args: "-o ./no-su", @@ -137,11 +137,7 @@ func TestCompleter_Complete(t *testing.T) { }, { args: "-o ./", - want: testTXTFiles, - }, - { - args: "-o ", - want: testTXTFiles, + want: append(testTXTFiles, "./", "./dir/"), }, { args: "-o ./read", |
