vim-patch:8.2.2589: recover test hangs in the GUI

Problem:    Recover test hangs in the GUI.
Solution:   Add g:skipped_reason to skip a _nocatch_ test.

776b954622

Now always skip the test as test_override() is N/A.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq 2022-11-17 20:21:10 +08:00
parent 1ab08e23b3
commit 5176ed88f6
2 changed files with 15 additions and 2 deletions

View File

@ -174,7 +174,12 @@ func RunTheTest(test)
if a:test =~ 'Test_nocatch_' if a:test =~ 'Test_nocatch_'
" Function handles errors itself. This avoids skipping commands after the " Function handles errors itself. This avoids skipping commands after the
" error. " error.
let g:skipped_reason = ''
exe 'call ' . a:test exe 'call ' . a:test
if g:skipped_reason != ''
call add(s:messages, ' Skipped')
call add(s:skipped, 'SKIPPED ' . a:test . ': ' . g:skipped_reason)
endif
else else
try try
let s:test = a:test let s:test = a:test

View File

@ -82,10 +82,18 @@ func Test_swap_file()
endfunc endfunc
func Test_nocatch_process_still_running() func Test_nocatch_process_still_running()
let g:skipped_reason = 'test_override() is N/A'
return
" sysinfo.uptime probably only works on Linux " sysinfo.uptime probably only works on Linux
CheckLinux if !has('linux')
let g:skipped_reason = 'only works on Linux'
return
endif
" the GUI dialog can't be handled " the GUI dialog can't be handled
CheckNotGui if has('gui_running')
let g:skipped_reason = 'only works in the terminal'
return
endif
" don't intercept existing swap file here " don't intercept existing swap file here
au! SwapExists au! SwapExists