aboutsummaryrefslogtreecommitdiffhomepage
path: root/fish_tests.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-01-23 18:07:21 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-01-23 18:07:21 -0800
commitf6afddd94bd3f47e414033746d038c5b222b63a3 (patch)
tree14a9638d655bb424ded9d80f1d38787bb363adda /fish_tests.cpp
parent9edf9ad2acb61a3d7e523c4903abda62655e45c9 (diff)
Fix for tab-completing arguments. Closes #1261
Diffstat (limited to 'fish_tests.cpp')
-rw-r--r--fish_tests.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/fish_tests.cpp b/fish_tests.cpp
index 8b08365b..c87bee69 100644
--- a/fish_tests.cpp
+++ b/fish_tests.cpp
@@ -1510,6 +1510,14 @@ static void test_complete(void)
completions.clear();
complete(L"echo (builtin scuttlebut", completions, COMPLETION_REQUEST_DEFAULT);
assert(completions.size() == 0);
+
+ /* Trailing spaces (#1261) */
+ complete_add(L"foobarbaz", false, 0, NULL, 0, NO_FILES, NULL, L"qux", NULL, COMPLETE_AUTO_SPACE);
+ completions.clear();
+ complete(L"foobarbaz ", completions, COMPLETION_REQUEST_DEFAULT);
+ assert(completions.size() == 1);
+ assert(completions.at(0).completion == L"qux");
+
complete_set_variable_names(NULL);
}