]> granicus.if.org Git - vim/commitdiff
patch 8.0.0933: terminal test tries to start GUI when it's not possible v8.0.0933
authorBram Moolenaar <Bram@vim.org>
Sun, 13 Aug 2017 18:26:20 +0000 (20:26 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 13 Aug 2017 18:26:20 +0000 (20:26 +0200)
Problem:    Terminal test tries to start GUI when it's not possible.
Solution:   Check if the GUI can run. (James McCoy, closes #1971)

src/testdir/shared.vim
src/testdir/test_gui.vim
src/testdir/test_gui_init.vim
src/testdir/test_terminal.vim
src/version.c

index 790b07b564c8ad571fa0ec9444f0dd884b400ae5..a305c90cb6deabb35d32e75262cf770f50d4606f 100644 (file)
@@ -215,3 +215,7 @@ func RunVimPiped(before, after, arguments, pipecmd)
   endif
   return 1
 endfunc
+
+func CanRunGui()
+  return has('gui') && ($DISPLAY != "" || has('gui_running'))
+endfunc
index f044f3a7b0c9875ebfa8e037b136c41117e1e941..427bab702cde2ef5c460cc9be228d853379ef0b1 100644 (file)
@@ -1,6 +1,7 @@
 " Tests specifically for the GUI
 
-if !has('gui') || ($DISPLAY == "" && !has('gui_running'))
+source shared.vim
+if !CanRunGui()
   finish
 endif
 
index 21e5bb6a7af8bc1f0ec8a41b501b1e7eb9c3b001..661bf0ce693f20b686f0d763ebf6f2be81c54ae8 100644 (file)
@@ -1,7 +1,8 @@
 " Tests specifically for the GUI features/options that need to be set up at
 " startup to take effect at runtime.
 
-if !has('gui') || ($DISPLAY == "" && !has('gui_running'))
+source shared.vim
+if !CanRunGui()
   finish
 endif
 
index 42783512f298d3fceacad2884e98c352433bd989..605292e6a5efda9388f6db3b8f0f283dfc8c8f70 100644 (file)
@@ -417,7 +417,7 @@ endfunc
 
 " must be last, we can't go back from GUI to terminal
 func Test_zz_terminal_in_gui()
-  if !has('gui')
+  if !CanRunGui()
     return
   endif
   gui -f
index 850be59f4a1e99bff4a74a6739d7af0b6805406d..ab8c3149f5e0df69efe453b58e49fc8f85c0272f 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    933,
 /**/
     932,
 /**/