diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-12 18:50:36 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-12 18:50:36 +0200 |
commit | 6d91bcb4d23b5c6a0be72c384beaf385e2d9d606 (patch) | |
tree | 0f4129e5f6e049ce5313520239de270cd9389580 /src/testdir/test_autocmd.vim | |
parent | c3d6e8a46a8fc5de622e8df9dbd25edd03e00c5b (diff) | |
download | vim-git-6d91bcb4d23b5c6a0be72c384beaf385e2d9d606.tar.gz |
patch 8.2.1432: various inconsistencies in test filesv8.2.1432
Problem: Various inconsistencies in test files.
Solution: Add modelines where they were missing. Use Check commands instead
of silently skipping over tests. Adjust indents and comments.
(Ken Takata, closes #6695)
Diffstat (limited to 'src/testdir/test_autocmd.vim')
-rw-r--r-- | src/testdir/test_autocmd.vim | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim index e6c7ec03c..ca8cc04c2 100644 --- a/src/testdir/test_autocmd.vim +++ b/src/testdir/test_autocmd.vim @@ -70,9 +70,7 @@ if has('timers') endfunc func Test_cursorhold_insert_with_timer_interrupt() - if !has('job') - return - endif + CheckFeature job " Need to move the cursor. call feedkeys("ggG", "xt") @@ -535,9 +533,7 @@ func s:AutoCommandOptionSet(match) endfunc func Test_OptionSet() - if !has("eval") || !exists("+autochdir") - return - endif + CheckOption autochdir badd test_autocmd.vim @@ -1778,12 +1774,11 @@ func Test_nocatch_wipe_all_buffers() endfunc func Test_nocatch_wipe_dummy_buffer() - if has('quickfix') - " Nasty autocommand: wipe buffer on any event. - au * x bwipe - call assert_fails('lv½ /x', 'E937') - au! - endif + CheckFeature quickfix + " Nasty autocommand: wipe buffer on any event. + au * x bwipe + call assert_fails('lv½ /x', 'E937') + au! endfunc function s:Before_test_dirchanged() @@ -1834,9 +1829,7 @@ function Test_dirchanged_local() endfunc function Test_dirchanged_auto() - if !exists('+autochdir') - return - endif + CheckOption autochdir call s:Before_test_dirchanged() call test_autochdir() autocmd test_dirchanged DirChanged auto call add(s:li, "auto:") @@ -2087,9 +2080,8 @@ endfunc " - FileReadPost decompress the file func Test_ReadWrite_Autocmds() " Run this test only on Unix-like systems and if gzip is available - if !has('unix') || !executable("gzip") - return - endif + CheckUnix + CheckExecutable gzip " Make $GZIP empty, "-v" would cause trouble. let $GZIP = "" |