]> granicus.if.org Git - vim/commitdiff
patch 8.1.0506: modeline test fails when run by root v8.1.0506
authorBram Moolenaar <Bram@vim.org>
Sat, 3 Nov 2018 18:06:25 +0000 (19:06 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 3 Nov 2018 18:06:25 +0000 (19:06 +0100)
Problem:    Modeline test fails when run by root.
Solution:   Set 'modeline' for the test. (James McCoy, closes #3592)

src/testdir/test_modeline.vim
src/version.c

index f02c68c7b7c41e6e2ff925fd5ec4d2c319650958..3bde58db407363cfc4670d1a0ac3f153a0378219 100644 (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
index 5da60271ce23e484bcf77cb121114ec9478da4ba..54b9a6c7b6e111287a6f00a9284e572f01f86aff 100644 (file)
@@ -792,6 +792,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    506,
 /**/
     505,
 /**/