diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-11-17 20:21:10 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-11-17 20:34:37 +0800 |
commit | 5176ed88f675e839a87dab0a2d20c3bd0269514b (patch) | |
tree | 33e2f29a4c70ae22fe944a14e255417bc087d821 | |
parent | 1ab08e23b3ba8fed10323ef5572c48413cfa7d96 (diff) | |
download | rneovim-5176ed88f675e839a87dab0a2d20c3bd0269514b.tar.gz rneovim-5176ed88f675e839a87dab0a2d20c3bd0269514b.tar.bz2 rneovim-5176ed88f675e839a87dab0a2d20c3bd0269514b.zip |
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.
https://github.com/vim/vim/commit/776b954622b45125dfdcb4a61243ca90956b0825
Now always skip the test as test_override() is N/A.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r-- | src/nvim/testdir/runtest.vim | 5 | ||||
-rw-r--r-- | src/nvim/testdir/test_recover.vim | 12 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim index ce23141c7a..a1b04a4601 100644 --- a/src/nvim/testdir/runtest.vim +++ b/src/nvim/testdir/runtest.vim @@ -174,7 +174,12 @@ func RunTheTest(test) if a:test =~ 'Test_nocatch_' " Function handles errors itself. This avoids skipping commands after the " error. + let g:skipped_reason = '' 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 try let s:test = a:test diff --git a/src/nvim/testdir/test_recover.vim b/src/nvim/testdir/test_recover.vim index 60e0fde29e..9de4ddc546 100644 --- a/src/nvim/testdir/test_recover.vim +++ b/src/nvim/testdir/test_recover.vim @@ -82,10 +82,18 @@ func Test_swap_file() endfunc func Test_nocatch_process_still_running() + let g:skipped_reason = 'test_override() is N/A' + return " 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 - CheckNotGui + if has('gui_running') + let g:skipped_reason = 'only works in the terminal' + return + endif " don't intercept existing swap file here au! SwapExists |