Mercurial > vim
annotate src/testdir/test_modeline.vim @ 17482:6cf077f59152 v8.1.1739
patch 8.1.1739: deleted match highlighting not updated in other window
commit https://github.com/vim/vim/commit/06029a857a3d4d90b3162090506c1e00dc84c60b
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jul 24 14:25:26 2019 +0200
patch 8.1.1739: deleted match highlighting not updated in other window
Problem: Deleted match highlighting not updated in other window.
Solution: Mark the window for refresh. (closes https://github.com/vim/vim/issues/4720) Also fix that
ambi-width check clears with wrong attributes.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 24 Jul 2019 14:30:08 +0200 |
parents | 63ac51f16ea1 |
children | 61fa1a9d09dd |
rev | line source |
---|---|
14381
d9e6eec551e1
patch 8.1.0205: invalid memory access with invalid modeline
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Tests for parsing the modeline. |
d9e6eec551e1
patch 8.1.0205: invalid memory access with invalid modeline
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
14383
8846b8344430
patch 8.1.0206: duplicate test function name
Christian Brabandt <cb@256bit.org>
parents:
14381
diff
changeset
|
3 func Test_modeline_invalid() |
14989
85467d180844
patch 8.1.0506: modeline test fails when run by root
Bram Moolenaar <Bram@vim.org>
parents:
14387
diff
changeset
|
4 " This was reading allocated memory in the past. |
14381
d9e6eec551e1
patch 8.1.0205: invalid memory access with invalid modeline
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 call writefile(['vi:0', 'nothing'], 'Xmodeline') |
14989
85467d180844
patch 8.1.0506: modeline test fails when run by root
Bram Moolenaar <Bram@vim.org>
parents:
14387
diff
changeset
|
6 let modeline = &modeline |
85467d180844
patch 8.1.0506: modeline test fails when run by root
Bram Moolenaar <Bram@vim.org>
parents:
14387
diff
changeset
|
7 set modeline |
14381
d9e6eec551e1
patch 8.1.0205: invalid memory access with invalid modeline
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 call assert_fails('split Xmodeline', 'E518:') |
15066
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
9 |
14989
85467d180844
patch 8.1.0506: modeline test fails when run by root
Bram Moolenaar <Bram@vim.org>
parents:
14387
diff
changeset
|
10 let &modeline = modeline |
14381
d9e6eec551e1
patch 8.1.0205: invalid memory access with invalid modeline
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 bwipe! |
14387
68722ba52971
patch 8.1.0208: file left behind after running individual test
Christian Brabandt <cb@256bit.org>
parents:
14383
diff
changeset
|
12 call delete('Xmodeline') |
14381
d9e6eec551e1
patch 8.1.0205: invalid memory access with invalid modeline
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 endfunc |
15066
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
14 |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
15 func Test_modeline_filetype() |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
16 call writefile(['vim: set ft=c :', 'nothing'], 'Xmodeline_filetype') |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
17 let modeline = &modeline |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
18 set modeline |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
19 filetype plugin on |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
20 split Xmodeline_filetype |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
21 call assert_equal("c", &filetype) |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
22 call assert_equal(1, b:did_ftplugin) |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
23 call assert_equal("ccomplete#Complete", &ofu) |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
24 |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
25 bwipe! |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
26 call delete('Xmodeline_filetype') |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
27 let &modeline = modeline |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
28 filetype plugin off |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
29 endfunc |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
30 |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
31 func Test_modeline_syntax() |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
32 call writefile(['vim: set syn=c :', 'nothing'], 'Xmodeline_syntax') |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
33 let modeline = &modeline |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
34 set modeline |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
35 syntax enable |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
36 split Xmodeline_syntax |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
37 call assert_equal("c", &syntax) |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
38 call assert_equal("c", b:current_syntax) |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
39 |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
40 bwipe! |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
41 call delete('Xmodeline_syntax') |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
42 let &modeline = modeline |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
43 syntax off |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
44 endfunc |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
45 |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
46 func Test_modeline_keymap() |
15071
aabaf1499d05
patch 8.1.0546: modeline test with keymap fails
Bram Moolenaar <Bram@vim.org>
parents:
15066
diff
changeset
|
47 if !has('keymap') |
aabaf1499d05
patch 8.1.0546: modeline test with keymap fails
Bram Moolenaar <Bram@vim.org>
parents:
15066
diff
changeset
|
48 return |
aabaf1499d05
patch 8.1.0546: modeline test with keymap fails
Bram Moolenaar <Bram@vim.org>
parents:
15066
diff
changeset
|
49 endif |
15066
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
50 call writefile(['vim: set keymap=greek :', 'nothing'], 'Xmodeline_keymap') |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
51 let modeline = &modeline |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
52 set modeline |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
53 split Xmodeline_keymap |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
54 call assert_equal("greek", &keymap) |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
55 call assert_match('greek\|grk', b:keymap_name) |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
56 |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
57 bwipe! |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
58 call delete('Xmodeline_keymap') |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
59 let &modeline = modeline |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
60 set keymap= iminsert=0 imsearch=-1 |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
61 endfunc |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
62 |
16728
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
63 func s:modeline_fails(what, text, error) |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
64 if !exists('+' .. a:what) |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
65 return |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
66 endif |
15066
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
67 let fname = "Xmodeline_fails_" . a:what |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
68 call writefile(['vim: set ' . a:text . ' :', 'nothing'], fname) |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
69 let modeline = &modeline |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
70 set modeline |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
71 filetype plugin on |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
72 syntax enable |
16728
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
73 call assert_fails('split ' . fname, a:error) |
15066
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
74 call assert_equal("", &filetype) |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
75 call assert_equal("", &syntax) |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
76 |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
77 bwipe! |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
78 call delete(fname) |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
79 let &modeline = modeline |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
80 filetype plugin off |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
81 syntax off |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
82 endfunc |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
83 |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
84 func Test_modeline_filetype_fails() |
16728
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
85 call s:modeline_fails('filetype', 'ft=evil$CMD', 'E474:') |
15066
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
86 endfunc |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
87 |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
88 func Test_modeline_syntax_fails() |
16728
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
89 call s:modeline_fails('syntax', 'syn=evil$CMD', 'E474:') |
15066
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
90 endfunc |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
91 |
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
92 func Test_modeline_keymap_fails() |
16728
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
93 call s:modeline_fails('keymap', 'keymap=evil$CMD', 'E474:') |
15066
40d9218b2b12
patch 8.1.0544: setting 'filetype' in a modeline causes an error
Bram Moolenaar <Bram@vim.org>
parents:
14989
diff
changeset
|
94 endfunc |
16728
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
95 |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
96 func Test_modeline_fails_always() |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
97 call s:modeline_fails('backupdir', 'backupdir=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
98 call s:modeline_fails('cdpath', 'cdpath=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
99 call s:modeline_fails('charconvert', 'charconvert=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
100 call s:modeline_fails('completefunc', 'completefunc=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
101 call s:modeline_fails('cscopeprg', 'cscopeprg=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
102 call s:modeline_fails('diffexpr', 'diffexpr=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
103 call s:modeline_fails('directory', 'directory=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
104 call s:modeline_fails('equalprg', 'equalprg=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
105 call s:modeline_fails('errorfile', 'errorfile=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
106 call s:modeline_fails('exrc', 'exrc=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
107 call s:modeline_fails('formatprg', 'formatprg=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
108 call s:modeline_fails('fsync', 'fsync=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
109 call s:modeline_fails('grepprg', 'grepprg=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
110 call s:modeline_fails('helpfile', 'helpfile=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
111 call s:modeline_fails('imactivatefunc', 'imactivatefunc=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
112 call s:modeline_fails('imstatusfunc', 'imstatusfunc=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
113 call s:modeline_fails('imstyle', 'imstyle=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
114 call s:modeline_fails('keywordprg', 'keywordprg=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
115 call s:modeline_fails('langmap', 'langmap=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
116 call s:modeline_fails('luadll', 'luadll=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
117 call s:modeline_fails('makeef', 'makeef=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
118 call s:modeline_fails('makeprg', 'makeprg=Something()', 'E520:') |
16798
63ac51f16ea1
patch 8.1.1401: misspelled mkspellmem as makespellmem
Bram Moolenaar <Bram@vim.org>
parents:
16732
diff
changeset
|
119 call s:modeline_fails('mkspellmem', 'mkspellmem=Something()', 'E520:') |
16728
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
120 call s:modeline_fails('mzschemedll', 'mzschemedll=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
121 call s:modeline_fails('mzschemegcdll', 'mzschemegcdll=Something()', 'E520:') |
16730
000350f8e4d1
patch 8.1.1367: can set 'modelineexpr' in modeline
Bram Moolenaar <Bram@vim.org>
parents:
16728
diff
changeset
|
122 call s:modeline_fails('modelineexpr', 'modelineexpr', 'E520:') |
16728
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
123 call s:modeline_fails('omnifunc', 'omnifunc=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
124 call s:modeline_fails('operatorfunc', 'operatorfunc=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
125 call s:modeline_fails('perldll', 'perldll=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
126 call s:modeline_fails('printdevice', 'printdevice=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
127 call s:modeline_fails('patchexpr', 'patchexpr=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
128 call s:modeline_fails('printexpr', 'printexpr=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
129 call s:modeline_fails('pythondll', 'pythondll=Something()', 'E520:') |
16732
6411f8ef550d
patch 8.1.1368: modeline test fails with python but without pythonhome
Bram Moolenaar <Bram@vim.org>
parents:
16730
diff
changeset
|
130 call s:modeline_fails('pythonhome', 'pythonhome=Something()', 'E520:') |
16728
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
131 call s:modeline_fails('pythonthreedll', 'pythonthreedll=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
132 call s:modeline_fails('pythonthreehome', 'pythonthreehome=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
133 call s:modeline_fails('pyxversion', 'pyxversion=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
134 call s:modeline_fails('rubydll', 'rubydll=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
135 call s:modeline_fails('runtimepath', 'runtimepath=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
136 call s:modeline_fails('secure', 'secure=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
137 call s:modeline_fails('shell', 'shell=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
138 call s:modeline_fails('shellcmdflag', 'shellcmdflag=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
139 call s:modeline_fails('shellpipe', 'shellpipe=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
140 call s:modeline_fails('shellquote', 'shellquote=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
141 call s:modeline_fails('shellredir', 'shellredir=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
142 call s:modeline_fails('shellxquote', 'shellxquote=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
143 call s:modeline_fails('spellfile', 'spellfile=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
144 call s:modeline_fails('spellsuggest', 'spellsuggest=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
145 call s:modeline_fails('tcldll', 'tcldll=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
146 call s:modeline_fails('titleold', 'titleold=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
147 call s:modeline_fails('viewdir', 'viewdir=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
148 call s:modeline_fails('viminfo', 'viminfo=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
149 call s:modeline_fails('viminfofile', 'viminfofile=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
150 call s:modeline_fails('winptydll', 'winptydll=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
151 call s:modeline_fails('undodir', 'undodir=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
152 " only check a few terminal options |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
153 call s:modeline_fails('t_AB', 't_AB=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
154 call s:modeline_fails('t_ce', 't_ce=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
155 call s:modeline_fails('t_sr', 't_sr=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
156 call s:modeline_fails('t_8b', 't_8b=Something()', 'E520:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
157 endfunc |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
158 |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
159 func Test_modeline_fails_modelineexpr() |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
160 call s:modeline_fails('balloonexpr', 'balloonexpr=Something()', 'E992:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
161 call s:modeline_fails('foldexpr', 'foldexpr=Something()', 'E992:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
162 call s:modeline_fails('foldtext', 'foldtext=Something()', 'E992:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
163 call s:modeline_fails('formatexpr', 'formatexpr=Something()', 'E992:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
164 call s:modeline_fails('guitablabel', 'guitablabel=Something()', 'E992:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
165 call s:modeline_fails('iconstring', 'iconstring=Something()', 'E992:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
166 call s:modeline_fails('includeexpr', 'includeexpr=Something()', 'E992:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
167 call s:modeline_fails('indentexpr', 'indentexpr=Something()', 'E992:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
168 call s:modeline_fails('rulerformat', 'rulerformat=Something()', 'E992:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
169 call s:modeline_fails('statusline', 'statusline=Something()', 'E992:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
170 call s:modeline_fails('tabline', 'tabline=Something()', 'E992:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
171 call s:modeline_fails('titlestring', 'titlestring=Something()', 'E992:') |
e55c26aaf484
patch 8.1.1366: using expressions in a modeline is unsafe
Bram Moolenaar <Bram@vim.org>
parents:
15073
diff
changeset
|
172 endfunc |