aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/fish_tests.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-08-02 17:58:37 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-08-08 13:55:49 -0700
commit97f1a8fe91abeda594945648c11b7f399df45135 (patch)
tree5737e5c2e721b08fb5cfc7949a18a2f8f4d3d1bb /src/fish_tests.cpp
parent0ac9f159d6b8235195d63f1669ca33dbc2474f47 (diff)
Factor the completion prefix behavior into its own function
In a few places, we need to add a prefix to completions that replace the token. This change factors that logic into its own function prepend_token_prefix.
Diffstat (limited to 'src/fish_tests.cpp')
-rw-r--r--src/fish_tests.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fish_tests.cpp b/src/fish_tests.cpp
index 157ee5ab..5df91f1d 100644
--- a/src/fish_tests.cpp
+++ b/src/fish_tests.cpp
@@ -1475,6 +1475,11 @@ static void test_expand()
L"/tmp/fish_expand_test/bar", L"/tmp/fish_expand_test/bax", L"/tmp/fish_expand_test/bax/xxx", L"/tmp/fish_expand_test/baz", L"/tmp/fish_expand_test/baz/xxx", wnull,
L"Glob did the wrong thing");
+ expand_test(L"/tmp/fish_expand_test/BA", FOR_COMPLETIONS,
+ L"/tmp/fish_expand_test/bar", L"/tmp/fish_expand_test/bax/", L"/tmp/fish_expand_test/baz/", wnull,
+ L"Case insensitive test did the wrong thing");
+
+
if (! expand_test(L"/tmp/fish_expand_test/.*", 0, L"/tmp/fish_expand_test/.foo", 0))
{