Problem: Test_xrestore sometimes fails.
Solution: Mark the test as flayky. Move marking test as flaky to the test
instead of listing them in runtest.
endtry
endif
-" Names of flaky tests.
-let s:flaky_tests = [
- \ 'Test_BufWrite_lockmarks()',
- \ 'Test_autocmd_SafeState()',
- \ 'Test_bufunload_all()',
- \ 'Test_client_server()',
- \ 'Test_close_and_exit_cb()',
- \ 'Test_close_output_buffer()',
- \ 'Test_collapse_buffers()',
- \ 'Test_cwd()',
- \ 'Test_diff_screen()',
- \ 'Test_exit_callback_interval()',
- \ 'Test_map_timeout_with_timer_interrupt()',
- \ 'Test_out_cb()',
- \ 'Test_pipe_through_sort_all()',
- \ 'Test_pipe_through_sort_some()',
- \ 'Test_popup_and_window_resize()',
- \ 'Test_quoteplus()',
- \ 'Test_quotestar()',
- \ 'Test_reltime()',
- \ 'Test_state()',
- \ 'Test_terminal_composing_unicode()',
- \ 'Test_terminal_does_not_truncate_last_newlines()',
- \ 'Test_terminal_no_cmd()',
- \ 'Test_terminal_noblock()',
- \ 'Test_terminal_redir_file()',
- \ 'Test_termwinscroll()',
- \ 'Test_timer_oneshot()',
- \ 'Test_timer_paused()',
- \ 'Test_timer_repeat_many()',
- \ 'Test_timer_repeat_three()',
- \ 'Test_timer_stop_all_in_callback()',
- \ 'Test_timer_stop_in_callback()',
- \ 'Test_timer_with_partial_callback()',
- \ ]
-
" Locate Test_ functions and execute them.
redir @q
silent function /^Test_
" - it fails five times (with a different message)
if len(v:errors) > 0
\ && $TEST_NO_RETRY == ''
- \ && (index(s:flaky_tests, g:testfunc) >= 0
- \ || g:test_is_flaky)
+ \ && g:test_is_flaky
while 1
call add(s:messages, 'Found errors in ' . g:testfunc . ':')
call extend(s:messages, v:errors)
" Test for BufUnload autocommand that unloads all the other buffers
func Test_bufunload_all()
+ let g:test_is_flaky = 1
call writefile(['Test file Xxx1'], 'Xxx1')"
call writefile(['Test file Xxx2'], 'Xxx2')"
func Test_autocmd_SafeState()
CheckRunVimInTerminal
+ let g:test_is_flaky = 1
let lines =<< trim END
let g:safe = 0
endfunc
func Test_BufWrite_lockmarks()
+ let g:test_is_flaky = 1
edit! Xtest
call setline(1, ['a', 'b', 'c', 'd'])
endfunc
func Test_close_output_buffer()
+ let g:test_is_flaky = 1
enew!
let test_lines = ['one', 'two']
call setline(1, test_lines)
func Run_pipe_through_sort(all, use_buffer)
CheckExecutable sort
+ let g:test_is_flaky = 1
let options = {'out_io': 'buffer', 'out_name': 'sortout'}
if a:use_buffer
endfunc
func Test_out_cb()
+ let g:test_is_flaky = 1
let dict = {'thisis': 'dict: '}
func dict.outHandler(chan, msg) dict
if type(a:msg) == v:t_string
endfunc
func Test_close_and_exit_cb()
+ let g:test_is_flaky = 1
let g:retdict = {'ret': {}}
func g:retdict.close_cb(ch) dict
let self.ret['close_cb'] = a:ch->ch_getjob()->job_status()
func Test_exit_callback_interval()
CheckFunction reltimefloat
+ let g:test_is_flaky = 1
let g:exit_cb_val = {'start': reltime(), 'end': 0, 'process': 0}
let job = [s:python, '-c', 'import time;time.sleep(0.5)']->job_start({'exit_cb': 'MyExitTimeCb'})
endfunc
func Test_collapse_buffers()
+ let g:test_is_flaky = 1
CheckExecutable cat
sp test_channel.vim
endfunc
func Test_cwd()
+ let g:test_is_flaky = 1
let g:envstr = ''
if has('win32')
let expect = $TEMP
endfunc
func Test_client_server()
+ let g:test_is_flaky = 1
let cmd = GetVimCommand()
if cmd == ''
throw 'GetVimCommand() failed'
endfunc
func Test_diff_screen()
+ let g:test_is_flaky = 1
CheckScreendump
CheckFeature menu
func Test_state()
CheckRunVimInTerminal
+ let g:test_is_flaky = 1
let getstate = ":echo 'state: ' .. g:state .. '; mode: ' .. g:mode\<CR>"
endfunc
func Test_quoteplus()
+ let g:test_is_flaky = 1
let skipped = ''
if !g:x11_based_gui
func Test_map_timeout_with_timer_interrupt()
CheckFeature job
CheckFeature timers
+ let g:test_is_flaky = 1
" Confirm the timer invoked in exit_cb of the job doesn't disturb mapped key
" sequence.
call feedkeys("v\<F4>", 'xt!')
call assert_equal(['v', 1, 12], [mode(1), col('v'), col('.')])
- " can invoke an opeartor, ending the visual mode
+ " can invoke an operator, ending the visual mode
let @a = ''
call feedkeys("\<F5>", 'xt!')
call assert_equal('n', mode(1))
func Test_xrestore()
CheckFeature xterm_clipboard
+ let g:test_is_flaky = 1
+
let display = $DISPLAY
new
call CheckCopyPaste()
CheckFeature terminal
CheckFeature quickfix
CheckNotGui
+ let g:test_is_flaky = 1
let h = winheight(0)
if h < 15
endfunc
func Test_quotestar()
+ let g:test_is_flaky = 1
let skipped = ''
let quotestar_saved = @*
CheckFeature float
func Test_reltime()
+ let g:test_is_flaky = 1
let now = reltime()
sleep 10m
let later = reltime()
endfunction
func Test_terminal_noblock()
+ let g:test_is_flaky = 1
let buf = term_start(&shell)
let wait_time = 5000
let letters = 'abcdefghijklmnopqrstuvwxyz'
endfunc
func Test_terminal_no_cmd()
+ let g:test_is_flaky = 1
let buf = term_start('NONE', {})
call assert_notequal(0, buf)
endfunc
func Test_terminal_redir_file()
+ let g:test_is_flaky = 1
let cmd = Get_cat_123_cmd()
let buf = term_start(cmd, {'out_io': 'file', 'out_name': 'Xfile'})
call TermWait(buf)
endfunc
func Test_terminal_composing_unicode()
+ let g:test_is_flaky = 1
let save_enc = &encoding
set encoding=utf-8
CheckUnix
" TODO: Somehow this test sometimes hangs in the GUI
CheckNotGui
+ let g:test_is_flaky = 1
" Let the terminal output more than 'termwinscroll' lines, some at the start
" will be dropped.
if has('conpty')
throw 'Skipped: fail on ConPTY'
endif
+ let g:test_is_flaky = 1
let contents = [
\ [ 'One', '', 'X' ],
\ [ 'Two', '', '' ],
endfunc
func Test_timer_oneshot()
+ let g:test_is_flaky = 1
let g:val = 0
let timer = timer_start(50, 'MyHandler')
let slept = WaitFor('g:val == 1')
endfunc
func Test_timer_repeat_three()
+ let g:test_is_flaky = 1
let g:val = 0
let timer = timer_start(50, 'MyHandler', {'repeat': 3})
let slept = WaitFor('g:val == 3')
endfunc
func Test_timer_repeat_many()
+ let g:test_is_flaky = 1
let g:val = 0
let timer = timer_start(50, 'MyHandler', {'repeat': -1})
sleep 200m
endfunc
func Test_timer_with_partial_callback()
+ let g:test_is_flaky = 1
let g:val = 0
let meow = {'one': 1}
function meow.bite(...)
endfunc
func Test_timer_paused()
+ let g:test_is_flaky = 1
let g:val = 0
let id = timer_start(50, 'MyHandler')
endfunc
func Test_timer_stop_in_callback()
+ let g:test_is_flaky = 1
call assert_equal(0, len(timer_info()))
let g:timer1 = timer_start(10, 'StopTimer1')
let slept = 0
endfunc
func Test_timer_stop_all_in_callback()
+ let g:test_is_flaky = 1
call assert_equal(0, len(timer_info()))
call timer_start(10, 'StopTimerAll')
call assert_equal(1, len(timer_info()))
call delete('XTest_timermessage')
endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 3518,
/**/
3517,
/**/