diff src/testdir/shared.vim @ 12106:d2c20ec4b95a v8.0.0933

patch 8.0.0933: terminal test tries to start GUI when it's not possible commit https://github.com/vim/vim/commit/9f0139a2a869b0804e5b91a65e3d5952c9091879 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 13 20:26:20 2017 +0200 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 https://github.com/vim/vim/issues/1971)
author Christian Brabandt <cb@256bit.org>
date Sun, 13 Aug 2017 20:30:05 +0200
parents c3227699ad4d
children 61a9642297cc
line wrap: on
line diff
--- a/src/testdir/shared.vim
+++ b/src/testdir/shared.vim
@@ -215,3 +215,7 @@ func RunVimPiped(before, after, argument
   endif
   return 1
 endfunc
+
+func CanRunGui()
+  return has('gui') && ($DISPLAY != "" || has('gui_running'))
+endfunc