diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_syntax.vim | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/old/testdir/test_syntax.vim b/test/old/testdir/test_syntax.vim index 207efb6223..6db5d3c04d 100644 --- a/test/old/testdir/test_syntax.vim +++ b/test/old/testdir/test_syntax.vim @@ -944,7 +944,7 @@ func Test_syn_contained_transparent() endfunc func Test_syn_include_contains_TOP() - let l:case = "TOP in included syntax means its group list name" + let l:case = "TOP in included syntax refers to top level of that included syntax" new syntax include @INCLUDED syntax/c.vim syntax region FencedCodeBlockC start=/```c/ end=/```/ contains=@INCLUDED @@ -959,6 +959,18 @@ func Test_syn_include_contains_TOP() bw! endfunc +func Test_syn_include_contains_TOP_excluding() + new + syntax include @INCLUDED syntax/c.vim + syntax region FencedCodeBlockC start=/```c/ end=/```/ contains=@INCLUDED + + call setline(1, ['```c', '#if 0', 'int', '#else', 'int', '#if', '#endif', '```' ]) + let l:expected = ["cCppOutElse", "cConditional"] + eval AssertHighlightGroups(6, 1, l:expected, 1) + syntax clear + bw! +endfunc + " This was using freed memory func Test_WinEnter_synstack_synID() autocmd WinEnter * call synstack(line("."), col(".")) |