Bram Moolenaar | c8ce615 | 2016-08-07 13:48:20 +0200 | [diff] [blame] | 1 | " Test for options |
| 2 | |
| 3 | function! Test_whichwrap() |
| 4 | set whichwrap=b,s |
| 5 | call assert_equal('b,s', &whichwrap) |
| 6 | |
| 7 | set whichwrap+=h,l |
| 8 | call assert_equal('b,s,h,l', &whichwrap) |
| 9 | |
| 10 | set whichwrap+=h,l |
| 11 | call assert_equal('b,s,h,l', &whichwrap) |
| 12 | |
| 13 | set whichwrap+=h,l |
| 14 | call assert_equal('b,s,h,l', &whichwrap) |
| 15 | |
| 16 | set whichwrap& |
| 17 | endfunction |
| 18 | |
Bram Moolenaar | 95ec9d6 | 2016-08-12 18:29:59 +0200 | [diff] [blame] | 19 | function Test_options() |
Bram Moolenaar | c8ce615 | 2016-08-07 13:48:20 +0200 | [diff] [blame] | 20 | let caught = 'ok' |
| 21 | try |
| 22 | options |
| 23 | catch |
| 24 | let caught = v:throwpoint . "\n" . v:exception |
| 25 | endtry |
| 26 | call assert_equal('ok', caught) |
| 27 | |
| 28 | " close option-window |
| 29 | close |
| 30 | endfunction |
| 31 | |
Bram Moolenaar | 95ec9d6 | 2016-08-12 18:29:59 +0200 | [diff] [blame] | 32 | function Test_path_keep_commas() |
Bram Moolenaar | c8ce615 | 2016-08-07 13:48:20 +0200 | [diff] [blame] | 33 | " Test that changing 'path' keeps two commas. |
| 34 | set path=foo,,bar |
| 35 | set path-=bar |
| 36 | set path+=bar |
| 37 | call assert_equal('foo,,bar', &path) |
| 38 | |
| 39 | set path& |
| 40 | endfunction |
Bram Moolenaar | 95ec9d6 | 2016-08-12 18:29:59 +0200 | [diff] [blame] | 41 | |
| 42 | func Test_signcolumn() |
Bram Moolenaar | ebcccad | 2016-08-12 19:17:13 +0200 | [diff] [blame] | 43 | if has('signs') |
| 44 | call assert_equal("auto", &signcolumn) |
| 45 | set signcolumn=yes |
| 46 | set signcolumn=no |
| 47 | call assert_fails('set signcolumn=nope') |
| 48 | endif |
Bram Moolenaar | 95ec9d6 | 2016-08-12 18:29:59 +0200 | [diff] [blame] | 49 | endfunc |
| 50 | |