diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2015-09-27 13:32:12 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2015-09-27 17:19:52 -0700 |
commit | dd245f62f0f30403961cd71abe8730ea51ab1855 (patch) | |
tree | a9b2c0e122aecb390208677e4a9f6ebc2c56b08a /src/fish_tests.cpp | |
parent | aa37b40d934a613a9cd3772ddf10cf7d24d5a0a9 (diff) |
Trailing slashes in wildcards need to match directories
Fixes the wrong sense in a waccess test.
Diffstat (limited to 'src/fish_tests.cpp')
-rw-r--r-- | src/fish_tests.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/fish_tests.cpp b/src/fish_tests.cpp index 889dfbb8..8adf4ca3 100644 --- a/src/fish_tests.cpp +++ b/src/fish_tests.cpp @@ -1513,6 +1513,15 @@ static void test_expand() expand_test(L"/tmp/fish_expand_test/b**", 0, L"/tmp/fish_expand_test/b", L"/tmp/fish_expand_test/b/x", 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", L"/tmp/fish_expand_test/baz/yyy", wnull, L"Glob did the wrong thing 4"); + + // a trailing slash should only produce directories + expand_test(L"/tmp/fish_expand_test/b*/", 0, + L"/tmp/fish_expand_test/b/", L"/tmp/fish_expand_test/baz/", L"/tmp/fish_expand_test/bax/", wnull, + L"Glob did the wrong thing 5"); + + expand_test(L"/tmp/fish_expand_test/b**/", 0, + L"/tmp/fish_expand_test/b/", L"/tmp/fish_expand_test/baz/", L"/tmp/fish_expand_test/bax/", wnull, + L"Glob did the wrong thing 6"); expand_test(L"/tmp/fish_expand_test/BA", EXPAND_FOR_COMPLETIONS, L"/tmp/fish_expand_test/bar", L"/tmp/fish_expand_test/bax/", L"/tmp/fish_expand_test/baz/", wnull, |