Skip to content

Commit 9691f82

Browse files
committed
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)
1 parent bd9a0c6 commit 9691f82

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/testdir/test_modeline.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
" Tests for parsing the modeline.
22

33
func Test_modeline_invalid()
4-
" This was reading before allocated memory.
4+
" This was reading allocated memory in the past.
55
call writefile(['vi:0', 'nothing'], 'Xmodeline')
6+
let modeline = &modeline
7+
set modeline
68
call assert_fails('split Xmodeline', 'E518:')
9+
let &modeline = modeline
710
bwipe!
811
call delete('Xmodeline')
912
endfunc

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,8 @@ static char *(features[]) =
792792

793793
static int included_patches[] =
794794
{ /* Add new patch number below this line */
795+
/**/
796+
506,
795797
/**/
796798
505,
797799
/**/

0 commit comments

Comments
 (0)