1
0
forked from aniani/vim
vim/src/testdir/test_modeline.vim

13 lines
327 B
VimL
Raw Normal View History

" Tests for parsing the modeline.
func Test_modeline_invalid()
" This was reading allocated memory in the past.
call writefile(['vi:0', 'nothing'], 'Xmodeline')
let modeline = &modeline
set modeline
call assert_fails('split Xmodeline', 'E518:')
let &modeline = modeline
bwipe!
call delete('Xmodeline')
endfunc