1
0
forked from aniani/vim

patch 8.1.0506: modeline test fails when run by root

Problem:    Modeline test fails when run by root.
Solution:   Set 'modeline' for the test. (James McCoy, closes #3592)
This commit is contained in:
Bram Moolenaar
2018-11-03 19:06:25 +01:00
parent bd9a0c611c
commit 9691f82f86
2 changed files with 6 additions and 1 deletions

View File

@@ -1,9 +1,12 @@
" Tests for parsing the modeline.
func Test_modeline_invalid()
" This was reading before allocated memory.
" 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

View File

@@ -792,6 +792,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
506,
/**/
505,
/**/