Mercurial > vim
comparison src/gen_opt_test.vim @ 10960:d7b78cbf85e4 v8.0.0369
patch 8.0.0369: a few options are not defined, depending on features
commit https://github.com/vim/vim/commit/c43a8b8de0676caf8a460b6af1310d7aba8221bb
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 25 21:12:29 2017 +0100
patch 8.0.0369: a few options are not defined, depending on features
Problem: The 'balloondelay', 'ballooneval' and 'balloonexpr' options are
not defined without the +balloon_eval feature. Testing that an
option value fails does not work for unsupported options.
Solution: Make the options defined but not supported. Don't test if
setting unsupported options fails.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 25 Feb 2017 21:15:03 +0100 |
parents | e5896de85dcf |
children | 6da4287fd735 |
comparison
equal
deleted
inserted
replaced
10959:1ac05274d9ee | 10960:d7b78cbf85e4 |
---|---|
25 \ 'columns': [[12, 80], [-1, 0, 10]], | 25 \ 'columns': [[12, 80], [-1, 0, 10]], |
26 \ 'conceallevel': [[0, 1, 2, 3], [-1, 4, 99]], | 26 \ 'conceallevel': [[0, 1, 2, 3], [-1, 4, 99]], |
27 \ 'foldcolumn': [[0, 1, 4, 12], [-1, 13, 999]], | 27 \ 'foldcolumn': [[0, 1, 4, 12], [-1, 13, 999]], |
28 \ 'helpheight': [[0, 10, 100], [-1]], | 28 \ 'helpheight': [[0, 10, 100], [-1]], |
29 \ 'history': [[0, 1, 100], [-1, 10001]], | 29 \ 'history': [[0, 1, 100], [-1, 10001]], |
30 \ 'iminsert': [[0, 1, 2], [-1, 3, 999]], | 30 \ 'iminsert': [[0, 1], [-1, 3, 999]], |
31 \ 'imsearch': [[-1, 0, 1, 2], [-2, 3, 999]], | 31 \ 'imsearch': [[-1, 0, 1], [-2, 3, 999]], |
32 \ 'lines': [[2, 24], [-1, 0, 1]], | 32 \ 'lines': [[2, 24], [-1, 0, 1]], |
33 \ 'numberwidth': [[1, 4, 8, 10], [-1, 0, 11]], | 33 \ 'numberwidth': [[1, 4, 8, 10], [-1, 0, 11]], |
34 \ 'regexpengine': [[0, 1, 2], [-1, 3, 999]], | 34 \ 'regexpengine': [[0, 1, 2], [-1, 3, 999]], |
35 \ 'report': [[0, 1, 2, 9999], [-1]], | 35 \ 'report': [[0, 1, 2, 9999], [-1]], |
36 \ 'scroll': [[0, 1, 2, 20], [-1]], | 36 \ 'scroll': [[0, 1, 2, 20], [-1]], |
168 else | 168 else |
169 for val in a[0] | 169 for val in a[0] |
170 call add(script, 'set ' . name . '=' . val) | 170 call add(script, 'set ' . name . '=' . val) |
171 call add(script, 'set ' . shortname . '=' . val) | 171 call add(script, 'set ' . shortname . '=' . val) |
172 endfor | 172 endfor |
173 | |
174 " setting an option can only fail when it's implemented. | |
175 call add(script, "if exists('+" . name . "')") | |
173 for val in a[1] | 176 for val in a[1] |
174 call add(script, "call assert_fails('set " . name . "=" . val . "')") | 177 call add(script, "call assert_fails('set " . name . "=" . val . "')") |
175 call add(script, "call assert_fails('set " . shortname . "=" . val . "')") | 178 call add(script, "call assert_fails('set " . shortname . "=" . val . "')") |
176 endfor | 179 endfor |
180 call add(script, "endif") | |
177 endif | 181 endif |
178 | 182 |
179 call add(script, 'set ' . name . '&') | 183 call add(script, 'set ' . name . '&') |
180 call add(script, 'set ' . shortname . '&') | 184 call add(script, 'set ' . shortname . '&') |
181 endif | 185 endif |