diff options
Diffstat (limited to 'src/nvim/testdir/test_syntax.vim')
-rw-r--r-- | src/nvim/testdir/test_syntax.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_syntax.vim b/src/nvim/testdir/test_syntax.vim index 309c0f460b..af2cbbfe8e 100644 --- a/src/nvim/testdir/test_syntax.vim +++ b/src/nvim/testdir/test_syntax.vim @@ -61,3 +61,18 @@ func Test_syn_iskeyword() quit! endfunc + +func Test_syntax_after_reload() + split Xsomefile + call setline(1, ['hello', 'there']) + w! + only! + setl filetype=hello + au FileType hello let g:gotit = 1 + call assert_false(exists('g:gotit')) + edit other + buf Xsomefile + call assert_equal('hello', &filetype) + call assert_true(exists('g:gotit')) + call delete('Xsomefile') +endfunc |