Mercurial > vim
diff src/testdir/test_autocmd.vim @ 21765:08940efa6b4e v8.2.1432
patch 8.2.1432: various inconsistencies in test files
Commit: https://github.com/vim/vim/commit/6d91bcb4d23b5c6a0be72c384beaf385e2d9d606
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 12 18:50:36 2020 +0200
patch 8.2.1432: various inconsistencies in test files
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 12 Aug 2020 19:00:08 +0200 |
parents | 5dcdb970111b |
children | 0ae284aaa8a2 |
line wrap: on
line diff
--- 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 = ""