view src/testdir/test_modeline.vim @ 14976:676db1b7fc35 v8.1.0499

patch 8.1.0499: :2vimgrep causes an ml_get error commit https://github.com/vim/vim/commit/1c29943416207e21abbc790eaf563b36789170c2 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Oct 28 14:36:09 2018 +0100 patch 8.1.0499: :2vimgrep causes an ml_get error Problem: :2vimgrep causes an ml_get error Solution: Pass tomatch pointer instead of value. (Yegappan Lakshmanan)
author Bram Moolenaar <Bram@vim.org>
date Sun, 28 Oct 2018 14:45:05 +0100
parents 68722ba52971
children 85467d180844
line wrap: on
line source

" Tests for parsing the modeline.

func Test_modeline_invalid()
  " This was reading before allocated memory.
  call writefile(['vi:0', 'nothing'], 'Xmodeline')
  call assert_fails('split Xmodeline', 'E518:')
  bwipe!
  call delete('Xmodeline')
endfunc