From 6d91bcb4d23b5c6a0be72c384beaf385e2d9d606 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 12 Aug 2020 18:50:36 +0200 Subject: [PATCH] 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) --- src/testdir/test_arglist.vim | 10 +- src/testdir/test_assert.vim | 2 + src/testdir/test_autochdir.vim | 2 + src/testdir/test_autocmd.vim | 28 +- src/testdir/test_autoload.vim | 2 + src/testdir/test_balloon.vim | 2 + src/testdir/test_balloon_gui.vim | 2 + src/testdir/test_behave.vim | 2 + src/testdir/test_blockedit.vim | 1 - src/testdir/test_breakindent.vim | 80 +- src/testdir/test_bufline.vim | 2 + src/testdir/test_bufwintabinfo.vim | 3 + src/testdir/test_cd.vim | 2 + src/testdir/test_changedtick.vim | 2 + src/testdir/test_changelist.vim | 6 +- src/testdir/test_channel.vim | 4 +- src/testdir/test_checkpath.vim | 2 + src/testdir/test_cindent.vim | 1 - src/testdir/test_cjk_linebreak.vim | 4 + src/testdir/test_clientserver.vim | 2 +- src/testdir/test_close_count.vim | 4 +- src/testdir/test_cmdline.vim | 36 +- src/testdir/test_command_count.vim | 2 + src/testdir/test_comparators.vim | 4 + src/testdir/test_compiler.vim | 2 + src/testdir/test_crypt.vim | 2 + src/testdir/test_cursorline.vim | 2 + src/testdir/test_curswant.vim | 2 + src/testdir/test_debugger.vim | 2 + src/testdir/test_delete.vim | 2 + src/testdir/test_diffmode.vim | 6 +- src/testdir/test_digraph.vim | 8 +- src/testdir/test_display.vim | 3 + src/testdir/test_edit.vim | 46 +- src/testdir/test_environ.vim | 4 + src/testdir/test_erasebackword.vim | 3 + src/testdir/test_escaped_glob.vim | 12 +- src/testdir/test_ex_equal.vim | 2 + src/testdir/test_ex_undo.vim | 2 + src/testdir/test_ex_z.vim | 2 + src/testdir/test_exec_while_if.vim | 2 + src/testdir/test_exists.vim | 1 + src/testdir/test_exists_autocmd.vim | 2 + src/testdir/test_exit.vim | 2 + src/testdir/test_expand_dllpath.vim | 4 + src/testdir/test_expr_utf8.vim | 2 + src/testdir/test_feedkeys.vim | 2 + src/testdir/test_file_size.vim | 11 +- src/testdir/test_fileformat.vim | 1 + src/testdir/test_filter_cmd.vim | 2 + src/testdir/test_find_complete.vim | 2 + src/testdir/test_findfile.vim | 2 + src/testdir/test_fixeol.vim | 3 + src/testdir/test_flatten.vim | 3 + src/testdir/test_fnameescape.vim | 2 +- src/testdir/test_fold.vim | 4 +- src/testdir/test_functions.vim | 32 +- src/testdir/test_ga.vim | 1 + src/testdir/test_getcwd.vim | 4 + src/testdir/test_getvar.vim | 2 + src/testdir/test_glob2regpat.vim | 2 + src/testdir/test_global.vim | 2 + src/testdir/test_gui.vim | 36 +- src/testdir/test_gui_init.vim | 2 + src/testdir/test_highlight.vim | 16 +- src/testdir/test_hlsearch.vim | 8 +- src/testdir/test_iminsert.vim | 5 +- src/testdir/test_increment_dbcs.vim | 1 + src/testdir/test_ins_complete.vim | 2 + src/testdir/test_interrupt.vim | 2 + src/testdir/test_job_fails.vim | 15 +- src/testdir/test_join.vim | 2 + src/testdir/test_json.vim | 2 + src/testdir/test_jumplist.vim | 8 +- src/testdir/test_jumps.vim | 4 + src/testdir/test_lambda.vim | 6 +- src/testdir/test_langmap.vim | 2 + src/testdir/test_largefile.vim | 2 + src/testdir/test_lineending.vim | 3 + src/testdir/test_listchars.vim | 2 + src/testdir/test_listener.vim | 18 +- src/testdir/test_listlbr.vim | 4 +- src/testdir/test_listlbr_utf8.vim | 4 +- src/testdir/test_makeencoding.vim | 2 + src/testdir/test_man.vim | 2 + src/testdir/test_mapping.vim | 13 +- src/testdir/test_marks.vim | 1 + src/testdir/test_matchadd_conceal.vim | 2 + src/testdir/test_matchadd_conceal_utf8.vim | 2 + src/testdir/test_memory_usage.vim | 2 + src/testdir/test_menu.vim | 4 +- src/testdir/test_messages.vim | 10 +- src/testdir/test_mksession.vim | 21 +- src/testdir/test_modeline.vim | 12 +- src/testdir/test_nested_function.vim | 13 +- src/testdir/test_number.vim | 2 + src/testdir/test_options.vim | 19 +- src/testdir/test_packadd.vim | 9 +- src/testdir/test_partial.vim | 43 +- src/testdir/test_paste.vim | 4 +- src/testdir/test_plus_arg_edit.vim | 1 + src/testdir/test_preview.vim | 1 + src/testdir/test_profile.vim | 2 + src/testdir/test_prompt_buffer.vim | 20 +- src/testdir/test_quickfix.vim | 850 ++++++++++----------- src/testdir/test_quotestar.vim | 4 +- src/testdir/test_random.vim | 2 + src/testdir/test_recover.vim | 2 + src/testdir/test_regex_char_classes.vim | 2 + src/testdir/test_regexp_latin.vim | 1 + src/testdir/test_registers.vim | 2 - src/testdir/test_rename.vim | 2 + src/testdir/test_retab.vim | 3 + src/testdir/test_scriptnames.vim | 2 + src/testdir/test_scroll_opt.vim | 3 +- src/testdir/test_scrollbind.vim | 3 + src/testdir/test_search_stat.vim | 2 + src/testdir/test_searchpos.vim | 2 + src/testdir/test_set.vim | 2 + src/testdir/test_sha256.vim | 2 + src/testdir/test_shift.vim | 2 + src/testdir/test_shortpathname.vim | 2 + src/testdir/test_signs.vim | 2 + src/testdir/test_sort.vim | 6 +- src/testdir/test_sound.vim | 2 + src/testdir/test_source_utf8.vim | 3 + src/testdir/test_spellfile.vim | 2 + src/testdir/test_startup.vim | 17 +- src/testdir/test_startup_utf8.vim | 8 +- src/testdir/test_stat.vim | 19 +- src/testdir/test_suspend.vim | 9 +- src/testdir/test_swap.vim | 14 +- src/testdir/test_syntax.vim | 17 +- src/testdir/test_tab.vim | 2 + src/testdir/test_tabline.vim | 1 + src/testdir/test_tagcase.vim | 2 + src/testdir/test_tagjump.vim | 14 +- src/testdir/test_taglist.vim | 11 +- src/testdir/test_termcodes.vim | 1 - src/testdir/test_termencoding.vim | 2 + src/testdir/test_terminal.vim | 4 +- src/testdir/test_terminal2.vim | 3 +- src/testdir/test_terminal3.vim | 2 + src/testdir/test_terminal_fail.vim | 22 +- src/testdir/test_true_false.vim | 2 + src/testdir/test_utf8_comparisons.vim | 2 + src/testdir/test_vartabs.vim | 4 +- src/testdir/test_version.vim | 2 + src/testdir/test_vim9_expr.vim | 2 + src/testdir/test_winbar.vim | 1 + src/testdir/test_winbuf_close.vim | 1 + src/testdir/test_window_cmd.vim | 6 +- src/testdir/test_window_id.vim | 1 + src/testdir/test_windows_home.vim | 2 + src/testdir/test_wnext.vim | 2 + src/testdir/test_wordcount.vim | 2 + src/testdir/test_writefile.vim | 10 +- src/testdir/test_xxd.vim | 3 + src/version.c | 2 + 159 files changed, 942 insertions(+), 873 deletions(-) diff --git a/src/testdir/test_arglist.vim b/src/testdir/test_arglist.vim index 198ca989a..820d8b969 100644 --- a/src/testdir/test_arglist.vim +++ b/src/testdir/test_arglist.vim @@ -242,11 +242,11 @@ endfunc func Test_args_with_quote() " Only on Unix can a file name include a double quote. - if has('unix') - args \"foobar - call assert_equal('"foobar', argv(0)) - %argdelete - endif + CheckUnix + + args \"foobar + call assert_equal('"foobar', argv(0)) + %argdelete endfunc " Test for 0argadd and 0argedit diff --git a/src/testdir/test_assert.vim b/src/testdir/test_assert.vim index 416060528..a3b45a170 100644 --- a/src/testdir/test_assert.vim +++ b/src/testdir/test_assert.vim @@ -374,3 +374,5 @@ func Test_zz_quit_detected() " Verify that if a test function ends Vim the test script detects this. quit endfunc + +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/testdir/test_autochdir.vim b/src/testdir/test_autochdir.vim index 1473854c9..d36d32609 100644 --- a/src/testdir/test_autochdir.vim +++ b/src/testdir/test_autochdir.vim @@ -24,3 +24,5 @@ func Test_set_filename() call chdir(cwd) call delete('samples/Xtest') endfunc + +" vim: shiftwidth=2 sts=2 expandtab 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 = "" diff --git a/src/testdir/test_autoload.vim b/src/testdir/test_autoload.vim index 57967bf64..384ee1a32 100644 --- a/src/testdir/test_autoload.vim +++ b/src/testdir/test_autoload.vim @@ -22,3 +22,5 @@ func Test_autoload_vim9script() call assert_equal('some', auto9#getsome()) call assert_equal(49, auto9#add42(7)) endfunc + +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/testdir/test_balloon.vim b/src/testdir/test_balloon.vim index bb22f7bf2..319e54601 100644 --- a/src/testdir/test_balloon.vim +++ b/src/testdir/test_balloon.vim @@ -64,3 +64,5 @@ func Test_balloon_eval_term_visual() call StopVimInTerminal(buf) call delete('XTest_beval_visual') endfunc + +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/testdir/test_balloon_gui.vim b/src/testdir/test_balloon_gui.vim index 70a88f36f..d01114c1c 100644 --- a/src/testdir/test_balloon_gui.vim +++ b/src/testdir/test_balloon_gui.vim @@ -17,3 +17,5 @@ func Test_balloon_show_gui() sleep 10m call balloon_show('') endfunc + +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/testdir/test_behave.vim b/src/testdir/test_behave.vim index c26bfe7ce..72411b487 100644 --- a/src/testdir/test_behave.vim +++ b/src/testdir/test_behave.vim @@ -27,3 +27,5 @@ endfunc func Test_behave_error() call assert_fails('behave x', 'E475:') endfunc + +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/testdir/test_blockedit.vim b/src/testdir/test_blockedit.vim index 180524cd7..de56f23cb 100644 --- a/src/testdir/test_blockedit.vim +++ b/src/testdir/test_blockedit.vim @@ -1,5 +1,4 @@ " Test for block inserting -" func Test_blockinsert_indent() new diff --git a/src/testdir/test_breakindent.vim b/src/testdir/test_breakindent.vim index 30c44f4dd..42b8c8cf2 100644 --- a/src/testdir/test_breakindent.vim +++ b/src/testdir/test_breakindent.vim @@ -46,9 +46,7 @@ endfunc func Test_breakindent01_vartabs() " like 01 but with vartabs feature - if !has("vartabs") - return - endif + CheckFeature vartabs call s:test_windows('setl briopt=min:0 vts=4') let lines = s:screen_lines(line('.'),8) let expect = [ @@ -75,9 +73,7 @@ func Test_breakindent02() endfunc func Test_breakindent02_vartabs() - if !has("vartabs") - return - endif + CheckFeature vartabs " simple breakindent test with showbreak set call s:test_windows('setl briopt=min:0 sbr=>> vts=4') let lines = s:screen_lines(line('.'),8) @@ -106,9 +102,7 @@ endfunc func Test_breakindent03_vartabs() " simple breakindent test with showbreak set and briopt including sbr - if !has("vartabs") - return - endif + CheckFeature vartabs call s:test_windows('setl briopt=sbr,min:0 sbr=++ vts=4') let lines = s:screen_lines(line('.'),8) let expect = [ @@ -139,9 +133,7 @@ endfunc func Test_breakindent04_vartabs() " breakindent set with min width 18 - if !has("vartabs") - return - endif + CheckFeature vartabs call s:test_windows('setl sbr= briopt=min:18 vts=4') let lines = s:screen_lines(line('.'),8) let expect = [ @@ -169,9 +161,7 @@ endfunc func Test_breakindent05_vartabs() " breakindent set and shift by 2 - if !has("vartabs") - return - endif + CheckFeature vartabs call s:test_windows('setl briopt=shift:2,min:0 vts=4') let lines = s:screen_lines(line('.'),8) let expect = [ @@ -198,9 +188,7 @@ endfunc func Test_breakindent06_vartabs() " breakindent set and shift by -1 - if !has("vartabs") - return - endif + CheckFeature vartabs call s:test_windows('setl briopt=shift:-1,min:0 vts=4') let lines = s:screen_lines(line('.'),8) let expect = [ @@ -227,9 +215,7 @@ func Test_breakindent07() endfunc func Test_breakindent07_vartabs() - if !has("vartabs") - return - endif + CheckFeature vartabs " breakindent set and shift by 1, Number set sbr=? and briopt:sbr call s:test_windows('setl briopt=shift:1,sbr,min:0 nu sbr=? nuw=4 cpo+=n vts=4') let lines = s:screen_lines(line('.'),10) @@ -258,9 +244,7 @@ func Test_breakindent07a() endfunc func Test_breakindent07a_vartabs() - if !has("vartabs") - return - endif + CheckFeature vartabs " breakindent set and shift by 1, Number set sbr=? and briopt:sbr call s:test_windows('setl briopt=shift:1,sbr,min:0 nu sbr=? nuw=4 vts=4') let lines = s:screen_lines(line('.'),10) @@ -293,9 +277,7 @@ func Test_breakindent08() endfunc func Test_breakindent08_vartabs() - if !has("vartabs") - return - endif + CheckFeature vartabs " breakindent set and shift by 1, Number and list set sbr=# and briopt:sbr call s:test_windows('setl briopt=shift:1,sbr,min:0 nu nuw=4 sbr=# list cpo+=n ts=4 vts=4') " make sure, cache is invalidated! @@ -327,9 +309,7 @@ func Test_breakindent08a() endfunc func Test_breakindent08a_vartabs() - if !has("vartabs") - return - endif + CheckFeature vartabs " breakindent set and shift by 1, Number and list set sbr=# and briopt:sbr call s:test_windows('setl briopt=shift:1,sbr,min:0 nu nuw=4 sbr=# list vts=4') let lines = s:screen_lines(line('.'),10) @@ -356,9 +336,7 @@ func Test_breakindent09() endfunc func Test_breakindent09_vartabs() - if !has("vartabs") - return - endif + CheckFeature vartabs " breakindent set and shift by 1, Number and list set sbr=# call s:test_windows('setl briopt=shift:1,min:0 nu nuw=4 sbr=# list vts=4') let lines = s:screen_lines(line('.'),10) @@ -390,9 +368,7 @@ func Test_breakindent10() endfunc func Test_breakindent10_vartabs() - if !has("vartabs") - return - endif + CheckFeature vartabs " breakindent set, Number set sbr=~ call s:test_windows('setl cpo+=n sbr=~ nu nuw=4 nolist briopt=sbr,min:0 vts=4') " make sure, cache is invalidated! @@ -421,9 +397,7 @@ func Test_breakindent11() endfunc func Test_breakindent11_vartabs() - if !has("vartabs") - return - endif + CheckFeature vartabs " test strdisplaywidth() call s:test_windows('setl cpo-=n sbr=>> nu nuw=4 nolist briopt= ts=4 vts=4') let text = getline(2) @@ -447,9 +421,7 @@ func Test_breakindent12() endfunc func Test_breakindent12_vartabs() - if !has("vartabs") - return - endif + CheckFeature vartabs " test breakindent with long indent let s:input = "\t\t\t\t\t{" call s:test_windows('setl breakindent linebreak briopt=min:10 nu numberwidth=3 ts=4 list listchars=tab:>- vts=4') @@ -478,9 +450,7 @@ func Test_breakindent13() endfunc func Test_breakindent13_vartabs() - if !has("vartabs") - return - endif + CheckFeature vartabs let s:input = "" call s:test_windows('setl breakindent briopt=min:10 ts=8 vts=8') vert resize 20 @@ -512,9 +482,7 @@ func Test_breakindent14() endfunc func Test_breakindent14_vartabs() - if !has("vartabs") - return - endif + CheckFeature vartabs let s:input = "" call s:test_windows('setl breakindent briopt= ts=8 vts=8') vert resize 30 @@ -548,9 +516,7 @@ func Test_breakindent15() endfunc func Test_breakindent15_vartabs() - if !has("vartabs") - return - endif + CheckFeature vartabs let s:input = "" call s:test_windows('setl breakindent briopt= ts=8 sw=8 vts=8') vert resize 30 @@ -592,9 +558,7 @@ func Test_breakindent16() endfunc func Test_breakindent16_vartabs() - if !has("vartabs") - return - endif + CheckFeature vartabs " Check that overlong lines are indented correctly. let s:input = "" call s:test_windows('setl breakindent briopt=min:0 ts=4 vts=4') @@ -620,9 +584,7 @@ func Test_breakindent16_vartabs() endfunc func Test_breakindent17_vartabs() - if !has("vartabs") - return - endif + CheckFeature vartabs let s:input = "" call s:test_windows('setl breakindent list listchars=tab:<-> showbreak=+++') call setline(1, "\t" . repeat('a', 63)) @@ -640,9 +602,7 @@ func Test_breakindent17_vartabs() endfunc func Test_breakindent18_vartabs() - if !has("vartabs") - return - endif + CheckFeature vartabs let s:input = "" call s:test_windows('setl breakindent list listchars=tab:<->') call setline(1, "\t" . repeat('a', 63)) diff --git a/src/testdir/test_bufline.vim b/src/testdir/test_bufline.vim index 3326e7d29..0f5bac873 100644 --- a/src/testdir/test_bufline.vim +++ b/src/testdir/test_bufline.vim @@ -202,3 +202,5 @@ func Test_appendbufline_redraw() call StopVimInTerminal(buf) call delete('XscriptMatchCommon') endfunc + +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/testdir/test_bufwintabinfo.vim b/src/testdir/test_bufwintabinfo.vim index eafadff63..f201753a2 100644 --- a/src/testdir/test_bufwintabinfo.vim +++ b/src/testdir/test_bufwintabinfo.vim @@ -1,4 +1,5 @@ " Tests for the getbufinfo(), getwininfo() and gettabinfo() functions + source check.vim func Test_getbufwintabinfo() @@ -168,3 +169,5 @@ func Test_getbufinfo_lines() edit Xfoo bw! endfunc + +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/testdir/test_cd.vim b/src/testdir/test_cd.vim index 8a0fbb247..0899bcde6 100644 --- a/src/testdir/test_cd.vim +++ b/src/testdir/test_cd.vim @@ -191,3 +191,5 @@ func Test_cd_completion() call delete('XComplDir2', 'd') call delete('XComplFile') endfunc + +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/testdir/test_changedtick.vim b/src/testdir/test_changedtick.vim index c789cdc1b..b7e7cd681 100644 --- a/src/testdir/test_changedtick.vim +++ b/src/testdir/test_changedtick.vim @@ -93,3 +93,5 @@ func Test_changedtick_not_incremented_with_write() bwipe call delete(fname) endfunc + +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/testdir/test_changelist.vim b/src/testdir/test_changelist.vim index 3741f32e6..9b28ede77 100644 --- a/src/testdir/test_changelist.vim +++ b/src/testdir/test_changelist.vim @@ -1,10 +1,10 @@ " Tests for the changelist functionality +source check.vim + " Tests for the getchangelist() function func Test_getchangelist() - if !has("jumplist") - return - endif + CheckFeature jumplist bwipe! enew diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim index ae7e3014c..065e8b403 100644 --- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -1348,9 +1348,7 @@ endfunction " This caused a crash, because messages were handled while peeking for a " character. func Test_exit_cb_wipes_buf() - if !has('timers') - return - endif + CheckFeature timers set cursorline lazyredraw call test_override('redraw_flag', 1) new diff --git a/src/testdir/test_checkpath.vim b/src/testdir/test_checkpath.vim index eff30cf20..28e910573 100644 --- a/src/testdir/test_checkpath.vim +++ b/src/testdir/test_checkpath.vim @@ -102,3 +102,5 @@ func Test_checkpath3() set include& set includeexpr& endfunc + +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/testdir/test_cindent.vim b/src/testdir/test_cindent.vim index dc8c51dbf..5926408d2 100644 --- a/src/testdir/test_cindent.vim +++ b/src/testdir/test_cindent.vim @@ -1,5 +1,4 @@ " Test for cinoptions and cindent -" func Test_cino_hash() " Test that curbuf->b_ind_hash_comment is correctly reset diff --git a/src/testdir/test_cjk_linebreak.vim b/src/testdir/test_cjk_linebreak.vim index dfaa8fa1a..17c59164a 100644 --- a/src/testdir/test_cjk_linebreak.vim +++ b/src/testdir/test_cjk_linebreak.vim @@ -1,3 +1,5 @@ +" Test for CJK linebreak + scriptencoding utf-8 func Run_cjk_linebreak_after(rigorous) @@ -95,3 +97,5 @@ func Test_cjk_linebreak_join_punct() %d_ endfor endfunc + +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/testdir/test_clientserver.vim b/src/testdir/test_clientserver.vim index db63ce3af..ab80bd2d5 100644 --- a/src/testdir/test_clientserver.vim +++ b/src/testdir/test_clientserver.vim @@ -30,7 +30,7 @@ endfunc func Test_client_server() let cmd = GetVimCommand() if cmd == '' - return + throw 'GetVimCommand() failed' endif call Check_X11_Connection() diff --git a/src/testdir/test_close_count.vim b/src/testdir/test_close_count.vim index 1f9adba32..c0c37304e 100644 --- a/src/testdir/test_close_count.vim +++ b/src/testdir/test_close_count.vim @@ -1,5 +1,5 @@ - " Tests for :[count]close! command + func Test_close_count() enew! | only @@ -172,3 +172,5 @@ func Test_winclose_command() set nohidden only! endfunc + +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index 539b782f3..266513ee9 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -86,9 +86,7 @@ func Test_complete_wildmenu() endfunc func Test_map_completion() - if !has('cmdline_compl') - return - endif + CheckFeature cmdline_compl call feedkeys(":map \\"\", 'xt') call assert_equal('"map ', getreg(':')) call feedkeys(":map