Mercurial > vim
diff 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 |
line wrap: on
line diff
--- a/src/gen_opt_test.vim +++ b/src/gen_opt_test.vim @@ -27,8 +27,8 @@ let test_values = { \ 'foldcolumn': [[0, 1, 4, 12], [-1, 13, 999]], \ 'helpheight': [[0, 10, 100], [-1]], \ 'history': [[0, 1, 100], [-1, 10001]], - \ 'iminsert': [[0, 1, 2], [-1, 3, 999]], - \ 'imsearch': [[-1, 0, 1, 2], [-2, 3, 999]], + \ 'iminsert': [[0, 1], [-1, 3, 999]], + \ 'imsearch': [[-1, 0, 1], [-2, 3, 999]], \ 'lines': [[2, 24], [-1, 0, 1]], \ 'numberwidth': [[1, 4, 8, 10], [-1, 0, 11]], \ 'regexpengine': [[0, 1, 2], [-1, 3, 999]], @@ -170,10 +170,14 @@ while 1 call add(script, 'set ' . name . '=' . val) call add(script, 'set ' . shortname . '=' . val) endfor + + " setting an option can only fail when it's implemented. + call add(script, "if exists('+" . name . "')") for val in a[1] call add(script, "call assert_fails('set " . name . "=" . val . "')") call add(script, "call assert_fails('set " . shortname . "=" . val . "')") endfor + call add(script, "endif") endif call add(script, 'set ' . name . '&')