1" Tests for parsing the modeline. 2 3func Test_modeline_invalid() 4 " This was reading allocated memory in the past. 5 call writefile(['vi:0', 'nothing'], 'Xmodeline') 6 let modeline = &modeline 7 set modeline 8 call assert_fails('split Xmodeline', 'E518:') 9 let &modeline = modeline 10 bwipe! 11 call delete('Xmodeline') 12endfunc 13