diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-06-06 16:12:12 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-06-06 16:12:12 +0200 |
commit | 5d30ff19648d2ff0696cea97582b902f6a4ec0ba (patch) | |
tree | 2b932551af5b577566f7d024d6491127ede12451 /src/testdir | |
parent | f6d50f1da8ed22cd6ff37ade965684dd1fa67a2c (diff) |
patch 8.1.1483: skipped tests are not properly listedv8.1.1483
Problem: Skipped tests are not properly listed.
Solution: Throw a "Skipped" exception instead of using ":finish" or ":return".
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_balloon.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_breakindent.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_cdo.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_channel.vim | 4 | ||||
-rw-r--r-- | src/testdir/test_clientserver.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_conceal.vim | 4 | ||||
-rw-r--r-- | src/testdir/test_debugger.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_diffmode.vim | 6 | ||||
-rw-r--r-- | src/testdir/test_fold.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_highlight.vim | 6 | ||||
-rw-r--r-- | src/testdir/test_popup.vim | 6 | ||||
-rw-r--r-- | src/testdir/test_popupwin.vim | 18 | ||||
-rw-r--r-- | src/testdir/test_search.vim | 12 | ||||
-rw-r--r-- | src/testdir/test_startup.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_startup_utf8.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_syntax.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_tabpage.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_termencoding.vim | 4 | ||||
-rw-r--r-- | src/testdir/test_terminal.vim | 36 | ||||
-rw-r--r-- | src/testdir/test_textprop.vim | 4 | ||||
-rw-r--r-- | src/testdir/test_timers.vim | 2 |
21 files changed, 61 insertions, 61 deletions
diff --git a/src/testdir/test_balloon.vim b/src/testdir/test_balloon.vim index 37fc57eb5c..abf7d6944e 100644 --- a/src/testdir/test_balloon.vim +++ b/src/testdir/test_balloon.vim @@ -9,7 +9,7 @@ if !has('gui_running') source screendump.vim if !CanRunVimInTerminal() - throw 'Skipped: cannot run Vim in a terminal window' + throw 'Skipped: cannot make screendumps' endif let s:common_script =<< [CODE] diff --git a/src/testdir/test_breakindent.vim b/src/testdir/test_breakindent.vim index ae05479cae..1dd5aa6b03 100644 --- a/src/testdir/test_breakindent.vim +++ b/src/testdir/test_breakindent.vim @@ -5,7 +5,7 @@ " It helps to change the tabstop setting and force a redraw (e.g. see " Test_breakindent08()) if !exists('+breakindent') - finish + throw 'Skipped: breakindent option not supported' endif source view_util.vim diff --git a/src/testdir/test_cdo.vim b/src/testdir/test_cdo.vim index 988de1dd26..aa2e4f1a8c 100644 --- a/src/testdir/test_cdo.vim +++ b/src/testdir/test_cdo.vim @@ -1,7 +1,7 @@ " Tests for the :cdo, :cfdo, :ldo and :lfdo commands if !has('quickfix') - finish + throw 'Skipped: quickfix feature missing' endif " Create the files used by the tests diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim index 2f2b5597fb..982a0459a1 100644 --- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -1,7 +1,7 @@ " Test for channel functions. if !has('channel') - finish + throw 'Skipped: channel feature missing' endif source shared.vim @@ -9,7 +9,7 @@ source shared.vim let s:python = PythonProg() if s:python == '' " Can't run this test without Python. - finish + throw 'Skipped: Python command missing' endif " Uncomment the next line to see what happens. Output is in diff --git a/src/testdir/test_clientserver.vim b/src/testdir/test_clientserver.vim index 5c01ac46fe..3377f86126 100644 --- a/src/testdir/test_clientserver.vim +++ b/src/testdir/test_clientserver.vim @@ -1,7 +1,7 @@ " Tests for the +clientserver feature. if !has('job') || !has('clientserver') - finish + throw 'Skipped: job and/or clientserver feature missing' endif source shared.vim diff --git a/src/testdir/test_conceal.vim b/src/testdir/test_conceal.vim index 66384e1c15..f114651c21 100644 --- a/src/testdir/test_conceal.vim +++ b/src/testdir/test_conceal.vim @@ -2,12 +2,12 @@ " Also see test88.in (should be converted to a test function here). if !has('conceal') - finish + throw 'Skipped: conceal feature missing' endif source screendump.vim if !CanRunVimInTerminal() - finish + throw 'Skipped: cannot make screendumps' endif func Test_conceal_two_windows() diff --git a/src/testdir/test_debugger.vim b/src/testdir/test_debugger.vim index 4c3d6721f1..4528b2bdbc 100644 --- a/src/testdir/test_debugger.vim +++ b/src/testdir/test_debugger.vim @@ -22,7 +22,7 @@ endfunc " Debugger tests func Test_Debugger() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif " Create a Vim script with some functions diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim index 81913c89a9..e5a3f2fcf4 100644 --- a/src/testdir/test_diffmode.vim +++ b/src/testdir/test_diffmode.vim @@ -748,7 +748,7 @@ endfunc func Test_diff_screen() if !CanRunVimInTerminal() || !has('menu') - return + throw 'Skipped: cannot make screendumps and/or menu feature missing' endif " clean up already existing swap files, just in case call delete('.Xfile1.swp') @@ -880,7 +880,7 @@ endfunc func Test_diff_with_cursorline() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif call writefile([ @@ -907,7 +907,7 @@ endfunc func Test_diff_of_diff() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif call writefile([ diff --git a/src/testdir/test_fold.vim b/src/testdir/test_fold.vim index 9ad82181c3..ed87007c19 100644 --- a/src/testdir/test_fold.vim +++ b/src/testdir/test_fold.vim @@ -708,7 +708,7 @@ endfunc func Test_folds_with_rnu() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif call writefile([ diff --git a/src/testdir/test_highlight.vim b/src/testdir/test_highlight.vim index 454845700d..78dbead8b9 100644 --- a/src/testdir/test_highlight.vim +++ b/src/testdir/test_highlight.vim @@ -533,7 +533,7 @@ endfunc func Test_cursorline_after_yank() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif call writefile([ @@ -555,7 +555,7 @@ endfunc func Test_cursorline_with_visualmode() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif call writefile([ @@ -575,7 +575,7 @@ endfunc func Test_wincolor() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif call writefile([ diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim index 538dd220ca..edb039944c 100644 --- a/src/testdir/test_popup.vim +++ b/src/testdir/test_popup.vim @@ -735,7 +735,7 @@ endfunc func Test_popup_and_previewwindow_dump() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif call writefile([ \ 'set previewheight=9', @@ -797,7 +797,7 @@ endfunc func Test_popup_position() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif call writefile([ \ '123456789_123456789_123456789_a', @@ -839,7 +839,7 @@ endfunc func Test_popup_command() if !CanRunVimInTerminal() || !has('menu') - return + throw 'Skipped: cannot make screendumps and/or menu feature missing' endif call writefile([ diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim index 50165ec62f..46a5d6d3f5 100644 --- a/src/testdir/test_popupwin.vim +++ b/src/testdir/test_popupwin.vim @@ -1,14 +1,14 @@ " Tests for popup windows if !has('textprop') - finish + throw 'Skipped: textprop feature missing' endif source screendump.vim func Test_simple_popup() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif call writefile([ \ "call setline(1, range(1, 100))", @@ -58,7 +58,7 @@ endfunc func Test_popup_with_border_and_padding() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif for iter in range(0, 1) @@ -128,7 +128,7 @@ endfunc func Test_popup_with_syntax_win_execute() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif call writefile([ \ "call setline(1, range(1, 100))", @@ -152,7 +152,7 @@ endfunc func Test_popup_with_syntax_setbufvar() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif let lines =<< trim END call setline(1, range(1, 100)) @@ -177,7 +177,7 @@ endfunc func Test_popup_all_corners() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif let lines =<< trim END call setline(1, repeat([repeat('-', 60)], 15)) @@ -340,7 +340,7 @@ endfunc func Test_popup_with_wrap() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif let lines =<< trim END call setline(1, range(1, 100)) @@ -359,7 +359,7 @@ endfunc func Test_popup_without_wrap() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif let lines =<< trim END call setline(1, range(1, 100)) @@ -760,7 +760,7 @@ endfunc func Test_popup_never_behind() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif " +-----------------------------+ " | | | diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim index 8090deeeb7..2765c8cbf8 100644 --- a/src/testdir/test_search.vim +++ b/src/testdir/test_search.vim @@ -799,7 +799,7 @@ endfunc func Test_incsearch_scrolling() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif call assert_equal(0, &scrolloff) call writefile([ @@ -832,7 +832,7 @@ func Test_incsearch_search_dump() return endif if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif call writefile([ \ 'set incsearch hlsearch scrolloff=0', @@ -887,7 +887,7 @@ func Test_incsearch_substitute_dump() return endif if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif call writefile([ \ 'set incsearch hlsearch scrolloff=0', @@ -983,7 +983,7 @@ endfunc func Test_incsearch_with_change() if !has('timers') || !exists('+incsearch') || !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps and/or timers feature and/or incsearch option missing' endif call writefile([ @@ -1011,7 +1011,7 @@ func Test_incsearch_sort_dump() return endif if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif call writefile([ \ 'set incsearch hlsearch scrolloff=0', @@ -1037,7 +1037,7 @@ func Test_incsearch_vimgrep_dump() return endif if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif call writefile([ \ 'set incsearch hlsearch scrolloff=0', diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim index 0ce8c81e6d..41bb12f20d 100644 --- a/src/testdir/test_startup.vim +++ b/src/testdir/test_startup.vim @@ -659,7 +659,7 @@ endfunc func Test_start_with_tabs() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif let buf = RunVimInTerminal('-p a b c', {}) diff --git a/src/testdir/test_startup_utf8.vim b/src/testdir/test_startup_utf8.vim index 8b3eca10d7..1b3d2184a0 100644 --- a/src/testdir/test_startup_utf8.vim +++ b/src/testdir/test_startup_utf8.vim @@ -63,7 +63,7 @@ endfunc func Test_detect_ambiwidth() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif " Use the title termcap entries to output the escape sequence. diff --git a/src/testdir/test_syntax.vim b/src/testdir/test_syntax.vim index 143f97ae81..bdcef51147 100644 --- a/src/testdir/test_syntax.vim +++ b/src/testdir/test_syntax.vim @@ -536,7 +536,7 @@ endfunc " Check highlighting for a small piece of C code with a screen dump. func Test_syntax_c() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif call writefile([ \ '/* comment line at the top */', diff --git a/src/testdir/test_tabpage.vim b/src/testdir/test_tabpage.vim index 60a5f3d968..e222067674 100644 --- a/src/testdir/test_tabpage.vim +++ b/src/testdir/test_tabpage.vim @@ -555,7 +555,7 @@ endfunc func Test_tabpage_cmdheight() if !CanRunVimInTerminal() - throw 'Skipped: only works with terminal' + throw 'Skipped: cannot make screendumps' endif call writefile([ \ 'set laststatus=2', diff --git a/src/testdir/test_termencoding.vim b/src/testdir/test_termencoding.vim index f4f5c5aaa9..49fb9d8a9f 100644 --- a/src/testdir/test_termencoding.vim +++ b/src/testdir/test_termencoding.vim @@ -3,12 +3,12 @@ " This only works with "iconv". if !has('iconv') - finish + throw 'Skipped: iconv feature missing' endif source screendump.vim if !CanRunVimInTerminal() - finish + throw 'Skipped: cannot make screendumps' endif " This Vim is running with 'encoding' "utf-8", the Vim in the terminal is diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index 9d6fddd01c..5fab97510b 100644 --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -1037,7 +1037,7 @@ endfunc " argument, check that :confirm qall works. func Test_terminal_qall_prompt() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif let buf = RunVimInTerminal('', {}) @@ -1098,7 +1098,7 @@ endfunc func Test_terminal_dumpwrite_composing() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif let save_enc = &encoding set encoding=utf-8 @@ -1224,7 +1224,7 @@ endfunc func Test_terminal_api_drop_newwin() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif let buf = Api_drop_common('') call assert_equal(0, &bin) @@ -1237,7 +1237,7 @@ endfunc func Test_terminal_api_drop_newwin_bin() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif let buf = Api_drop_common(',{"bin":1}') call assert_equal(1, &bin) @@ -1249,7 +1249,7 @@ endfunc func Test_terminal_api_drop_newwin_binary() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif let buf = Api_drop_common(',{"binary":1}') call assert_equal(1, &bin) @@ -1261,7 +1261,7 @@ endfunc func Test_terminal_api_drop_newwin_nobin() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif set binary let buf = Api_drop_common(',{"nobin":1}') @@ -1275,7 +1275,7 @@ endfunc func Test_terminal_api_drop_newwin_nobinary() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif set binary let buf = Api_drop_common(',{"nobinary":1}') @@ -1289,7 +1289,7 @@ endfunc func Test_terminal_api_drop_newwin_ff() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif let buf = Api_drop_common(',{"ff":"dos"}') call assert_equal("dos", &ff) @@ -1301,7 +1301,7 @@ endfunc func Test_terminal_api_drop_newwin_fileformat() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif let buf = Api_drop_common(',{"fileformat":"dos"}') call assert_equal("dos", &ff) @@ -1313,7 +1313,7 @@ endfunc func Test_terminal_api_drop_newwin_enc() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif let buf = Api_drop_common(',{"enc":"utf-16"}') call assert_equal("utf-16", &fenc) @@ -1325,7 +1325,7 @@ endfunc func Test_terminal_api_drop_newwin_encoding() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif let buf = Api_drop_common(',{"encoding":"utf-16"}') call assert_equal("utf-16", &fenc) @@ -1337,7 +1337,7 @@ endfunc func Test_terminal_api_drop_oldwin() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif let firstwinid = win_getid() split Xtextfile @@ -1380,7 +1380,7 @@ endfunc func Test_terminal_api_call() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif call WriteApiCall('Tapi_TryThis') @@ -1397,7 +1397,7 @@ endfunc func Test_terminal_api_call_fails() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif call WriteApiCall('TryThis') @@ -1423,7 +1423,7 @@ endfunc func Test_terminal_api_call_fail_delete() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif call WriteApiCall('Tapi_Delete') @@ -1507,7 +1507,7 @@ endfunc func Test_terminal_all_ansi_colors() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif " Use all the ANSI colors. @@ -1564,7 +1564,7 @@ endfunc func Test_terminal_termwinsize_option_fixed() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif set termwinsize=6x40 let text = [] @@ -2030,7 +2030,7 @@ endfunc func Test_terminal_getwinpos() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif " split, go to the bottom-right window diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim index cb86186b4b..bfd39d5da0 100644 --- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -655,7 +655,7 @@ endfunc func Test_textprop_screenshot_various() " The Vim running in the terminal needs to use utf-8. if !CanRunVimInTerminal() || g:orig_encoding != 'utf-8' - return + throw 'Skipped: cannot make screendumps or not using utf-8' endif call writefile([ \ "call setline(1, [" @@ -750,7 +750,7 @@ endfunc " screenshot test with Visual block mode operations func Test_textprop_screenshot_visual() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif " Delete two columns while text props are three chars wide. diff --git a/src/testdir/test_timers.vim b/src/testdir/test_timers.vim index e900b1f5d8..963cc23276 100644 --- a/src/testdir/test_timers.vim +++ b/src/testdir/test_timers.vim @@ -281,7 +281,7 @@ endfunc func Test_restore_count() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif " Check that v:count is saved and restored, not changed by a timer. call writefile([ |