diff options
author | 2014-09-21 23:34:49 -0700 | |
---|---|---|
committer | 2014-09-21 23:35:19 -0700 | |
commit | 7d7a636f2497dae736c7dc7b2378a7d51e28fd92 (patch) | |
tree | 2a31ffc26c05f6a683ac850f40cae8de889b5255 /fish_tests.cpp | |
parent | 2450d00693358bf6466621377f56bb815d44374a (diff) |
Allow running executables with $ in their name.
Fixes #1686
Diffstat (limited to 'fish_tests.cpp')
-rw-r--r-- | fish_tests.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fish_tests.cpp b/fish_tests.cpp index 7222065f..8d30d5f4 100644 --- a/fish_tests.cpp +++ b/fish_tests.cpp @@ -1303,7 +1303,7 @@ static void test_lru(void) \param flags the flags to send to expand_string */ -static int expand_test(const wchar_t *in, int flags, ...) +static int expand_test(const wchar_t *in, expand_flags_t flags, ...) { std::vector<completion_t> output; va_list va; @@ -1379,6 +1379,11 @@ static void test_expand() err(L"Failed to handle null escape in expansion"); } + if (!expand_test(L"foo\\$bar", EXPAND_SKIP_VARIABLES, L"foo$bar", 0)) + { + err(L"Failed to handle dollar sign in variable-skipping expansion"); + } + if (system("mkdir -p /tmp/fish_expand_test/")) err(L"mkdir failed"); if (system("touch /tmp/fish_expand_test/.foo")) err(L"touch failed"); if (system("touch /tmp/fish_expand_test/bar")) err(L"touch failed"); |