Bram Moolenaar | 9cf4b50 | 2018-07-23 04:12:03 +0200 | [diff] [blame] | 1 | " Tests for parsing the modeline. |
| 2 | |
Bram Moolenaar | cd96eef | 2018-07-23 04:49:23 +0200 | [diff] [blame] | 3 | func Test_modeline_invalid() |
Bram Moolenaar | 9cf4b50 | 2018-07-23 04:12:03 +0200 | [diff] [blame] | 4 | " This was reading before allocated memory. |
| 5 | call writefile(['vi:0', 'nothing'], 'Xmodeline') |
| 6 | call assert_fails('split Xmodeline', 'E518:') |
| 7 | bwipe! |
Bram Moolenaar | 7624af0 | 2018-07-24 04:51:20 +0200 | [diff] [blame] | 8 | call delete('Xmodeline') |
Bram Moolenaar | 9cf4b50 | 2018-07-23 04:12:03 +0200 | [diff] [blame] | 9 | endfunc |