]> granicus.if.org Git - vim/commitdiff
patch 8.2.2589: recover test hangs in the GUI v8.2.2589
authorBram Moolenaar <Bram@vim.org>
Wed, 10 Mar 2021 21:27:48 +0000 (22:27 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 10 Mar 2021 21:27:48 +0000 (22:27 +0100)
Problem:    Recover test hangs in the GUI.
Solution:   Add g:skipped_reason to skip a _nocatch_ test.

src/testdir/runtest.vim
src/testdir/test_recover.vim
src/version.c

index 369d931f166a0fb127343b17d430188715d4c701..4602051a734c61dd2232b551215c7eda212e68ae 100644 (file)
@@ -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)
index 28676632c575e707e8f158ed08cc7ab8723c040a..a1ff7d92af4f13dccf16001d7406a33f25040e3f 100644 (file)
@@ -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
index 4d693c45f0489833f9d249531949172ed13dac5c..87ac80f5be441b376e3ccc8ada36cb24f180721b 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2589,
 /**/
     2588,
 /**/