aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/fish_tests.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-09-12 16:31:28 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-09-12 16:32:52 -0700
commitf5093f1625246d74bbb5a623ad3be257962edb18 (patch)
tree70202a9a80db78352abbb19848d1386555feca44 /src/fish_tests.cpp
parent4bc8cf1a1af219b50e5b54fba5375b1af3c44738 (diff)
Fix tests under certain vswprintf calls
Work around an issue where vswprintf may not append ANY_STRING from a format specifier
Diffstat (limited to 'src/fish_tests.cpp')
-rw-r--r--src/fish_tests.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fish_tests.cpp b/src/fish_tests.cpp
index eb26460b..3b36b577 100644
--- a/src/fish_tests.cpp
+++ b/src/fish_tests.cpp
@@ -1530,8 +1530,10 @@ static void test_expand()
L"", wnull, // We just expect the empty string since this is an exact match
L"Wrong fuzzy matching 2");
+ // some vswprintfs refuse to append ANY_STRING in a format specifiers, so don't use format_string here
+ const wcstring any_str_str(1, ANY_STRING);
expand_test(L"/tmp/fish_expand_test/b/xx*", EXPAND_FOR_COMPLETIONS | EXPAND_FUZZY_MATCH,
- format_string(L"/tmp/fish_expand_test/bax/xx%lc", (wint_t)ANY_STRING).c_str(), format_string(L"/tmp/fish_expand_test/baz/xx%lc", (wint_t)ANY_STRING).c_str(), wnull,
+ (L"/tmp/fish_expand_test/bax/xx" + any_str_str).c_str(), (L"/tmp/fish_expand_test/baz/xx" + any_str_str).c_str(), wnull,
L"Wrong fuzzy matching 3");
expand_test(L"/tmp/fish_expand_test/b/yyy", EXPAND_FOR_COMPLETIONS | EXPAND_FUZZY_MATCH,