diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-09-13 20:31:54 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-09-13 20:31:54 +0200 |
commit | fe8ef98dd1d0b7d296d7db29b1e2fd1b56b788de (patch) | |
tree | e59e23d496796a07ef980df1b99cf26a58d0309f /runtime | |
parent | c91c500348f3f026a06d1c3565b380d86b8c55ee (diff) |
patch 8.1.0386: cannot test with non-default option valuev8.1.0386
Problem: Cannot test with non-default option value.
Solution: Add test_option_not_set().
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 2ff124b691..fdac40586b 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2473,6 +2473,7 @@ test_null_job() Job null value for testing test_null_list() List null value for testing test_null_partial() Funcref null value for testing test_null_string() String null value for testing +test_option_not_set({name}) none reset flag indicating option was set test_override({expr}, {val}) none test with Vim internal overrides test_settime({expr}) none set current time for testing timer_info([{id}]) List information about timers @@ -8737,6 +8738,15 @@ test_null_partial() *test_null_partial()* test_null_string() *test_null_string()* Return a String that is null. Only useful for testing. +test_option_not_set({name}) *test_option_not_set()* + Reset the flag that indicates option {name} was set. Thus it + looks like it still has the default value. Use like this: > + set ambiwidth=double + call test_option_not_set('ambiwidth') +< Now the 'ambiwidth' option behaves like it was never changed, + even though the value is "double". + Only to be used for testing! + test_override({name}, {val}) *test_override()* Overrides certain parts of Vims internal processing to be able to run tests. Only to be used for testing Vim! |