aboutsummaryrefslogtreecommitdiffhomepage
path: root/fish_tests.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-02-03 14:13:42 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-02-03 14:16:00 -0800
commitbac3b39227ce327d1747e86ee249f8f131e5d4bb (patch)
tree9d423233e9bdf99662caede20021656df4492a8f /fish_tests.cpp
parentc168e6f87043281a371b135b3ff753ebb12fee45 (diff)
Highlight the entire variable name, not just the dollar sign. Fixes #1201
Diffstat (limited to 'fish_tests.cpp')
-rw-r--r--fish_tests.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/fish_tests.cpp b/fish_tests.cpp
index 6082f092..13e9d2fa 100644
--- a/fish_tests.cpp
+++ b/fish_tests.cpp
@@ -2708,9 +2708,23 @@ static void test_highlighting(void)
{L"'single_quote", highlight_spec_error},
{NULL, -1}
};
+
+ const highlight_component_t components11[] =
+ {
+ {L"echo", highlight_spec_command},
+ {L"$foo", highlight_spec_operator},
+ {L"\"", highlight_spec_quote},
+ {L"$bar", highlight_spec_operator},
+ {L"\"", highlight_spec_quote},
+ {L"$baz[", highlight_spec_operator},
+ {L"1 2..3", highlight_spec_param},
+ {L"]", highlight_spec_operator},
+ {NULL, -1}
+ };
+
- const highlight_component_t *tests[] = {components1, components2, components3, components4, components5, components6, components7, components8, components9, components10};
+ const highlight_component_t *tests[] = {components1, components2, components3, components4, components5, components6, components7, components8, components9, components10, components11};
for (size_t which = 0; which < sizeof tests / sizeof *tests; which++)
{
const highlight_component_t *components = tests[which];