annotate src/testdir/gen_opt_test.vim @ 12248:f9de19f981a4 v8.0.1004

patch 8.0.1004: matchstrpos() without a match returns too many items commit https://github.com/vim/vim/commit/8d9f0ef5c6a6f6d19c3d02690e1ee347a70b8452 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 27 13:51:01 2017 +0200 patch 8.0.1004: matchstrpos() without a match returns too many items Problem: Matchstrpos() without a match returns too many items. Solution: Also remove the second item when the position is beyond the end of the string. (Hirohito Higashi) Use an enum for the type.
author Christian Brabandt <cb@256bit.org>
date Sun, 27 Aug 2017 14:00:05 +0200
parents 7e8a467acd6e
children 1ff5e5dfa9b0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11079
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Script to generate testdir/opt_test.vim from option.c
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 set cpo=&vim
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 " Only do this when build with the +eval feature.
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 if 1
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 set nomore
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9
11097
d32c9d8fa01a patch 8.0.0436: running the options test sometimes resizes the terminal
Christian Brabandt <cb@256bit.org>
parents: 11083
diff changeset
10 " The terminal size is restored at the end.
d32c9d8fa01a patch 8.0.0436: running the options test sometimes resizes the terminal
Christian Brabandt <cb@256bit.org>
parents: 11083
diff changeset
11 " Clear out t_WS, we don't want to resize the actual terminal.
11079
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 let script = [
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 \ 'let save_columns = &columns',
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 \ 'let save_lines = &lines',
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 \ 'let save_term = &term',
11097
d32c9d8fa01a patch 8.0.0436: running the options test sometimes resizes the terminal
Christian Brabandt <cb@256bit.org>
parents: 11083
diff changeset
16 \ 'set t_WS=',
11079
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 \ ]
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19 /#define p_term
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 let end = line('.')
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22 " Two lists with values: values that work and values that fail.
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23 " When not listed, "othernum" or "otherstring" is used.
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24 let test_values = {
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25 \ 'cmdheight': [[1, 2, 10], [-1, 0]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 \ 'cmdwinheight': [[1, 2, 10], [-1, 0]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27 \ 'columns': [[12, 80], [-1, 0, 10]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28 \ 'conceallevel': [[0, 1, 2, 3], [-1, 4, 99]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29 \ 'foldcolumn': [[0, 1, 4, 12], [-1, 13, 999]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30 \ 'helpheight': [[0, 10, 100], [-1]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31 \ 'history': [[0, 1, 100], [-1, 10001]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32 \ 'iminsert': [[0, 1], [-1, 3, 999]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33 \ 'imsearch': [[-1, 0, 1], [-2, 3, 999]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
34 \ 'lines': [[2, 24], [-1, 0, 1]],
11083
ae86651164d7 patch 8.0.0430: options test fails or hangs on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 11081
diff changeset
35 \ 'linespace': [[0, 2, 4], ['']],
11079
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
36 \ 'numberwidth': [[1, 4, 8, 10], [-1, 0, 11]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
37 \ 'regexpengine': [[0, 1, 2], [-1, 3, 999]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38 \ 'report': [[0, 1, 2, 9999], [-1]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39 \ 'scroll': [[0, 1, 2, 20], [-1]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
40 \ 'scrolljump': [[-50, -1, 0, 1, 2, 20], [999]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
41 \ 'scrolloff': [[0, 1, 2, 20], [-1]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
42 \ 'shiftwidth': [[0, 1, 8, 999], [-1]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
43 \ 'sidescroll': [[0, 1, 8, 999], [-1]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
44 \ 'sidescrolloff': [[0, 1, 8, 999], [-1]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
45 \ 'tabstop': [[1, 4, 8, 12], [-1, 0]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
46 \ 'textwidth': [[0, 1, 8, 99], [-1]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
47 \ 'timeoutlen': [[0, 8, 99999], [-1]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
48 \ 'titlelen': [[0, 1, 8, 9999], [-1]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
49 \ 'updatecount': [[0, 1, 8, 9999], [-1]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
50 \ 'updatetime': [[0, 1, 8, 9999], [-1]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
51 \ 'verbose': [[-1, 0, 1, 8, 9999], []],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
52 \ 'wildcharm': [[-1, 0, 100], []],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
53 \ 'winheight': [[1, 10, 999], [-1, 0]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
54 \ 'winminheight': [[0, 1], [-1]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
55 \ 'winminwidth': [[0, 1, 10], [-1]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
56 \ 'winwidth': [[1, 10, 999], [-1, 0]],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
57 \
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
58 \ 'ambiwidth': [['', 'single'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
59 \ 'background': [['', 'light', 'dark'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
60 \ 'backspace': [[0, 2, '', 'eol', 'eol,start'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
61 \ 'backupcopy': [['yes', 'auto'], ['', 'xxx', 'yes,no']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
62 \ 'backupext': [['xxx'], ['']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
63 \ 'belloff': [['', 'all', 'copy,error'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
64 \ 'breakindentopt': [['', 'min:3', 'sbr'], ['xxx', 'min', 'min:x']],
11083
ae86651164d7 patch 8.0.0430: options test fails or hangs on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 11081
diff changeset
65 \ 'browsedir': [['', 'last', '/'], ['xxx']],
11079
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
66 \ 'bufhidden': [['', 'hide', 'wipe'], ['xxx', 'hide,wipe']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
67 \ 'buftype': [['', 'help', 'nofile'], ['xxx', 'help,nofile']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
68 \ 'casemap': [['', 'internal'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
69 \ 'cedit': [['', '\<Esc>'], ['xxx', 'f']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
70 \ 'clipboard': [['', 'unnamed', 'autoselect,unnamed'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
71 \ 'colorcolumn': [['', '8', '+2'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
72 \ 'comments': [['', 'b:#'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
73 \ 'commentstring': [['', '/*%s*/'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
74 \ 'complete': [['', 'w,b'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
75 \ 'concealcursor': [['', 'n', 'nvic'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
76 \ 'completeopt': [['', 'menu', 'menu,longest'], ['xxx', 'menu,,,longest,']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
77 \ 'cryptmethod': [['', 'zip'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
78 \ 'cscopequickfix': [['', 's-', 's-,c+,e0'], ['xxx', 's,g,d']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
79 \ 'debug': [['', 'msg', 'msg', 'beep'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
80 \ 'diffopt': [['', 'filler', 'icase,iwhite'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
81 \ 'display': [['', 'lastline', 'lastline,uhex'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
82 \ 'eadirection': [['', 'both', 'ver'], ['xxx', 'ver,hor']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
83 \ 'encoding': [['latin1'], ['xxx', '']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
84 \ 'eventignore': [['', 'WinEnter', 'WinLeave,winenter'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
85 \ 'fileencoding': [['', 'latin1', 'xxx'], []],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
86 \ 'fileformat': [['', 'dos', 'unix'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
87 \ 'fileformats': [['', 'dos', 'dos,unix'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
88 \ 'fillchars': [['', 'vert:x'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
89 \ 'foldclose': [['', 'all'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
90 \ 'foldmethod': [['manual', 'indent'], ['', 'xxx', 'expr,diff']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
91 \ 'foldopen': [['', 'all', 'hor,jump'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
92 \ 'foldmarker': [['((,))'], ['', 'xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
93 \ 'formatoptions': [['', 'vt', 'v,t'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
94 \ 'guicursor': [['', 'n:block-Cursor'], ['xxx']],
11083
ae86651164d7 patch 8.0.0430: options test fails or hangs on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 11081
diff changeset
95 \ 'guifont': [['', 'fixedsys'], []],
ae86651164d7 patch 8.0.0430: options test fails or hangs on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 11081
diff changeset
96 \ 'guifontwide': [['', 'fixedsys'], []],
11079
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
97 \ 'helplang': [['', 'de', 'de,it'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
98 \ 'highlight': [['', 'e:Error'], ['xxx']],
11401
fc1939947789 patch 8.0.0585: test_options fails when run in the GUI
Christian Brabandt <cb@256bit.org>
parents: 11203
diff changeset
99 \ 'imactivatekey': [['', 'S-space'], ['xxx']],
11079
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
100 \ 'isfname': [['', '@', '@,48-52'], ['xxx', '@48']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
101 \ 'isident': [['', '@', '@,48-52'], ['xxx', '@48']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
102 \ 'iskeyword': [['', '@', '@,48-52'], ['xxx', '@48']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
103 \ 'isprint': [['', '@', '@,48-52'], ['xxx', '@48']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
104 \ 'keymap': [['', 'accents'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
105 \ 'keymodel': [['', 'startsel', 'startsel,stopsel'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
106 \ 'langmap': [['', 'xX', 'aA,bB'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
107 \ 'listchars': [['', 'eol:x', 'eol:x,space:y'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
108 \ 'matchpairs': [['', '(:)', '(:),<:>'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
109 \ 'mkspellmem': [['10000,100,12'], ['', 'xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
110 \ 'mouse': [['', 'a', 'nvi'], ['xxx', 'n,v,i']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
111 \ 'mousemodel': [['', 'popup'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
112 \ 'mouseshape': [['', 'n:arrow'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
113 \ 'nrformats': [['', 'alpha', 'alpha,hex,bin'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
114 \ 'printmbfont': [['', 'r:some', 'b:Bold,c:yes'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
115 \ 'printoptions': [['', 'header:0', 'left:10pc,top:5pc'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
116 \ 'scrollopt': [['', 'ver', 'ver,hor'], ['xxx']],
11083
ae86651164d7 patch 8.0.0430: options test fails or hangs on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 11081
diff changeset
117 \ 'renderoptions': [['', 'type:directx'], ['xxx']],
11079
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
118 \ 'selection': [['old', 'inclusive'], ['', 'xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
119 \ 'selectmode': [['', 'mouse', 'key,cmd'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
120 \ 'sessionoptions': [['', 'blank', 'help,options,slash'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
121 \ 'signcolumn': [['', 'auto', 'no'], ['xxx', 'no,yes']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
122 \ 'spellfile': [['', 'file.en.add'], ['xxx', '/tmp/file']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
123 \ 'spellsuggest': [['', 'best', 'double,33'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
124 \ 'switchbuf': [['', 'useopen', 'split,newtab'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
125 \ 'tagcase': [['smart', 'match'], ['', 'xxx', 'smart,match']],
11083
ae86651164d7 patch 8.0.0430: options test fails or hangs on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 11081
diff changeset
126 \ 'term': [[], []],
11721
7e8a467acd6e patch 8.0.0743: the 'termsize' option can be set to an invalid value
Christian Brabandt <cb@256bit.org>
parents: 11401
diff changeset
127 \ 'termsize': [['', '24x80', '0x80', '32x0', '0x0'], ['xxx', '80', '8ax9', '24x80b']],
11079
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
128 \ 'toolbar': [['', 'icons', 'text'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
129 \ 'toolbariconsize': [['', 'tiny', 'huge'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
130 \ 'ttymouse': [['', 'xterm'], ['xxx']],
11083
ae86651164d7 patch 8.0.0430: options test fails or hangs on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 11081
diff changeset
131 \ 'ttytype': [[], []],
11079
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
132 \ 'viewoptions': [['', 'cursor', 'unix,slash'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
133 \ 'viminfo': [['', '''50', '"30'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
134 \ 'virtualedit': [['', 'all', 'all,block'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
135 \ 'whichwrap': [['', 'b,s', 'bs'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
136 \ 'wildmode': [['', 'full', 'list:full', 'full,longest'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
137 \ 'wildoptions': [['', 'tagfile'], ['xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
138 \ 'winaltkeys': [['menu', 'no'], ['', 'xxx']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
139 \
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
140 \ 'luadll': [[], []],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
141 \ 'perldll': [[], []],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
142 \ 'pythondll': [[], []],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
143 \ 'pythonthreedll': [[], []],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
144 \ 'pyxversion': [[], []],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
145 \ 'rubydll': [[], []],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
146 \ 'tcldll': [[], []],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
147 \
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
148 \ 'othernum': [[-1, 0, 100], ['']],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
149 \ 'otherstring': [['', 'xxx'], []],
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
150 \}
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
151
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
152 1
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
153 /struct vimoption options
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
154 while 1
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
155 /{"
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
156 if line('.') > end
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
157 break
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
158 endif
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
159 let line = getline('.')
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
160 let name = substitute(line, '.*{"\([^"]*\)".*', '\1', '')
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
161 let shortname = substitute(line, '.*"\([^"]*\)".*', '\1', '')
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
162
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
163 if has_key(test_values, name)
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
164 let a = test_values[name]
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
165 elseif line =~ 'P_NUM'
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
166 let a = test_values['othernum']
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
167 else
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
168 let a = test_values['otherstring']
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
169 endif
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
170 if len(a[0]) > 0 || len(a[1]) > 0
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
171 if line =~ 'P_BOOL'
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
172 call add(script, 'set ' . name)
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
173 call add(script, 'set ' . shortname)
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
174 call add(script, 'set no' . name)
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
175 call add(script, 'set no' . shortname)
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
176 else
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
177 for val in a[0]
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
178 call add(script, 'set ' . name . '=' . val)
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
179 call add(script, 'set ' . shortname . '=' . val)
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
180 endfor
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
181
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
182 " setting an option can only fail when it's implemented.
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
183 call add(script, "if exists('+" . name . "')")
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
184 for val in a[1]
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
185 call add(script, "call assert_fails('set " . name . "=" . val . "')")
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
186 call add(script, "call assert_fails('set " . shortname . "=" . val . "')")
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
187 endfor
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
188 call add(script, "endif")
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
189 endif
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
190
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
191 call add(script, 'set ' . name . '&')
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
192 call add(script, 'set ' . shortname . '&')
11203
c3504890b37d patch 8.0.0488: running tests leaves an "xxx" file behind
Christian Brabandt <cb@256bit.org>
parents: 11097
diff changeset
193 if name == 'verbosefile'
c3504890b37d patch 8.0.0488: running tests leaves an "xxx" file behind
Christian Brabandt <cb@256bit.org>
parents: 11097
diff changeset
194 call add(script, 'call delete("xxx")')
c3504890b37d patch 8.0.0488: running tests leaves an "xxx" file behind
Christian Brabandt <cb@256bit.org>
parents: 11097
diff changeset
195 endif
11079
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
196
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
197 if name == 'more'
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
198 call add(script, 'set nomore')
11083
ae86651164d7 patch 8.0.0430: options test fails or hangs on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 11081
diff changeset
199 elseif name == 'lines'
ae86651164d7 patch 8.0.0430: options test fails or hangs on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 11081
diff changeset
200 call add(script, 'let &lines = save_lines')
11079
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
201 endif
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
202 endif
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
203 endwhile
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
204
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
205 call add(script, 'let &term = save_term')
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
206 call add(script, 'let &columns = save_columns')
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
207 call add(script, 'let &lines = save_lines')
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
208
11081
bbdb4f0134cb patch 8.0.0429: options test does not always test everything
Christian Brabandt <cb@256bit.org>
parents: 11079
diff changeset
209 call writefile(script, 'opt_test.vim')
11079
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
210
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
211 endif
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
212
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
213 qa!