aboutsummaryrefslogtreecommitdiffhomepage
path: root/fish_tests.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-01-03 17:42:25 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-01-03 17:42:25 -0800
commitbf75731bbe479ced1a1afd3ec088c51fafbb4c12 (patch)
tree51bfe0c4c8f605b9b2e3caf68d41624bdd29c206 /fish_tests.cpp
parentc8eec109b2621c71ea23bbdf8c3334aeec4aed88 (diff)
Fix for wrong syntax highlighting in the face of tokenizer errors, e.g.
"echo 'hi"
Diffstat (limited to 'fish_tests.cpp')
-rw-r--r--fish_tests.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/fish_tests.cpp b/fish_tests.cpp
index 6a52f120..0ce1092a 100644
--- a/fish_tests.cpp
+++ b/fish_tests.cpp
@@ -2638,8 +2638,15 @@ static void test_highlighting(void)
{NULL, -1}
};
+ const highlight_component_t components10[] =
+ {
+ {L"echo", HIGHLIGHT_COMMAND},
+ {L"'single_quote", HIGHLIGHT_ERROR},
+ {NULL, -1}
+ };
+
- const highlight_component_t *tests[] = {components1, components2, components3, components4, components5, components6, components7, components8, components9};
+ const highlight_component_t *tests[] = {components1, components2, components3, components4, components5, components6, components7, components8, components9, components10};
for (size_t which = 0; which < sizeof tests / sizeof *tests; which++)
{
const highlight_component_t *components = tests[which];