Problem: Skipped tests are not properly listed.
Solution: Throw a "Skipped" exception instead of using ":finish" or ":return".
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]
" 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
" 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
" Test for channel functions.
if !has('channel')
- finish
+ throw 'Skipped: channel feature missing'
endif
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
" Tests for the +clientserver feature.
if !has('job') || !has('clientserver')
- finish
+ throw 'Skipped: job and/or clientserver feature missing'
endif
source shared.vim
" 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()
" 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
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')
func Test_diff_with_cursorline()
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot run Vim in a terminal window'
endif
call writefile([
func Test_diff_of_diff()
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot run Vim in a terminal window'
endif
call writefile([
func Test_folds_with_rnu()
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot make screendumps'
endif
call writefile([
func Test_cursorline_after_yank()
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot make screendumps'
endif
call writefile([
func Test_cursorline_with_visualmode()
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot make screendumps'
endif
call writefile([
func Test_wincolor()
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot make screendumps'
endif
call writefile([
func Test_popup_and_previewwindow_dump()
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot make screendumps'
endif
call writefile([
\ 'set previewheight=9',
func Test_popup_position()
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot make screendumps'
endif
call writefile([
\ '123456789_123456789_123456789_a',
func Test_popup_command()
if !CanRunVimInTerminal() || !has('menu')
- return
+ throw 'Skipped: cannot make screendumps and/or menu feature missing'
endif
call writefile([
" 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))",
func Test_popup_with_border_and_padding()
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot make screendumps'
endif
for iter in range(0, 1)
func Test_popup_with_syntax_win_execute()
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot make screendumps'
endif
call writefile([
\ "call setline(1, range(1, 100))",
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))
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))
func Test_popup_with_wrap()
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot make screendumps'
endif
let lines =<< trim END
call setline(1, range(1, 100))
func Test_popup_without_wrap()
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot make screendumps'
endif
let lines =<< trim END
call setline(1, range(1, 100))
func Test_popup_never_behind()
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot make screendumps'
endif
" +-----------------------------+
" | | |
func Test_incsearch_scrolling()
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot make screendumps'
endif
call assert_equal(0, &scrolloff)
call writefile([
return
endif
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot make screendumps'
endif
call writefile([
\ 'set incsearch hlsearch scrolloff=0',
return
endif
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot make screendumps'
endif
call writefile([
\ 'set incsearch hlsearch scrolloff=0',
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([
return
endif
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot make screendumps'
endif
call writefile([
\ 'set incsearch hlsearch scrolloff=0',
return
endif
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot make screendumps'
endif
call writefile([
\ 'set incsearch hlsearch scrolloff=0',
func Test_start_with_tabs()
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot make screendumps'
endif
let buf = RunVimInTerminal('-p a b c', {})
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.
" 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 */',
func Test_tabpage_cmdheight()
if !CanRunVimInTerminal()
- throw 'Skipped: only works with terminal'
+ throw 'Skipped: cannot make screendumps'
endif
call writefile([
\ 'set laststatus=2',
" 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
" 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('', {})
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
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)
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)
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)
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}')
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}')
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)
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)
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)
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)
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
func Test_terminal_api_call()
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot run Vim in a terminal window'
endif
call WriteApiCall('Tapi_TryThis')
func Test_terminal_api_call_fails()
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot run Vim in a terminal window'
endif
call WriteApiCall('TryThis')
func Test_terminal_api_call_fail_delete()
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot run Vim in a terminal window'
endif
call WriteApiCall('Tapi_Delete')
func Test_terminal_all_ansi_colors()
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot run Vim in a terminal window'
endif
" Use all the ANSI colors.
func Test_terminal_termwinsize_option_fixed()
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot run Vim in a terminal window'
endif
set termwinsize=6x40
let text = []
func Test_terminal_getwinpos()
if !CanRunVimInTerminal()
- return
+ throw 'Skipped: cannot run Vim in a terminal window'
endif
" split, go to the bottom-right window
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, ["
" 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.
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([
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1483,
/**/
1482,
/**/