changeset 24095:467c3022fba6 v8.2.2589

patch 8.2.2589: recover test hangs in the GUI Commit: https://github.com/vim/vim/commit/776b954622b45125dfdcb4a61243ca90956b0825 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 10 22:27:48 2021 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Wed, 10 Mar 2021 22:30:03 +0100
parents c05b22a0905b
children 8c4686919942
files src/testdir/runtest.vim src/testdir/test_recover.vim src/version.c
diffstat 3 files changed, 15 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -196,7 +196,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
       au VimLeavePre * call EarlyExit(g:testfunc)
--- a/src/testdir/test_recover.vim
+++ b/src/testdir/test_recover.vim
@@ -80,9 +80,15 @@ endfunc
 
 func Test_nocatch_process_still_running()
   " 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
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2589,
+/**/
     2588,
 /**/
     2587,