forked from aniani/vim
patch 8.1.1483: skipped tests are not properly listed
Problem: Skipped tests are not properly listed. Solution: Throw a "Skipped" exception instead of using ":finish" or ":return".
This commit is contained in:
@@ -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]
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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()
|
||||
|
@@ -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
|
||||
|
@@ -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([
|
||||
|
@@ -708,7 +708,7 @@ endfunc
|
||||
|
||||
func Test_folds_with_rnu()
|
||||
if !CanRunVimInTerminal()
|
||||
return
|
||||
throw 'Skipped: cannot make screendumps'
|
||||
endif
|
||||
|
||||
call writefile([
|
||||
|
@@ -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([
|
||||
|
@@ -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([
|
||||
|
@@ -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
|
||||
" +-----------------------------+
|
||||
" | | |
|
||||
|
@@ -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',
|
||||
|
@@ -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', {})
|
||||
|
@@ -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.
|
||||
|
@@ -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 */',
|
||||
|
@@ -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',
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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.
|
||||
|
@@ -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([
|
||||
|
@@ -767,6 +767,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1483,
|
||||
/**/
|
||||
1482,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user