Permalink
Browse files

patch 8.0.0933: terminal test tries to start GUI when it's not possible

Problem:    Terminal test tries to start GUI when it's not possible.
Solution:   Check if the GUI can run. (James McCoy, closes #1971)
  • Loading branch information...
brammool committed Aug 13, 2017
1 parent 4f44b88 commit 9f0139a2a869b0804e5b91a65e3d5952c9091879
Showing with 11 additions and 3 deletions.
  1. +4 −0 src/testdir/shared.vim
  2. +2 −1 src/testdir/test_gui.vim
  3. +2 −1 src/testdir/test_gui_init.vim
  4. +1 −1 src/testdir/test_terminal.vim
  5. +2 −0 src/version.c
View
@@ -215,3 +215,7 @@ func RunVimPiped(before, after, arguments, pipecmd)
endif
return 1
endfunc
func CanRunGui()
return has('gui') && ($DISPLAY != "" || has('gui_running'))
endfunc
View
@@ -1,6 +1,7 @@
" Tests specifically for the GUI
if !has('gui') || ($DISPLAY == "" && !has('gui_running'))
source shared.vim
if !CanRunGui()
finish
endif
@@ -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
@@ -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
View
@@ -769,6 +769,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
933,
/**/
932,
/**/

0 comments on commit 9f0139a

Please sign in to comment.