Correctly detect unbalanced 'end' in syntax highlighting

This commit is contained in:
ridiculousfish
2013-11-25 00:48:01 -08:00
parent 920adb8296
commit 2a1fd421bd
2 changed files with 8 additions and 2 deletions

View File

@@ -2263,9 +2263,15 @@ static void test_highlighting(void)
{L"param2", HIGHLIGHT_PARAM},
{NULL, -1}
};
const highlight_component_t components9[] =
{
{L"end", HIGHLIGHT_ERROR},
{NULL, -1}
};
const highlight_component_t *tests[] = {components1, components2, components3, components4, components5, components6, components7, components8};
const highlight_component_t *tests[] = {components1, components2, components3, components4, components5, components6, components7, components8, components9};
for (size_t which = 0; which < sizeof tests / sizeof *tests; which++)
{
const highlight_component_t *components = tests[which];