diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-08-13 20:26:20 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-08-13 20:26:20 +0200 |
commit | 9f0139a2a869b0804e5b91a65e3d5952c9091879 (patch) | |
tree | cc1dbfb2b8c6742dd62f910b455200bb620392fd /src/testdir/shared.vim | |
parent | 4f44b886840a90a50575204bc29f72ef309cfaf6 (diff) |
patch 8.0.0933: terminal test tries to start GUI when it's not possiblev8.0.0933
Problem: Terminal test tries to start GUI when it's not possible.
Solution: Check if the GUI can run. (James McCoy, closes #1971)
Diffstat (limited to 'src/testdir/shared.vim')
-rw-r--r-- | src/testdir/shared.vim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/testdir/shared.vim b/src/testdir/shared.vim index 790b07b564..a305c90cb6 100644 --- a/src/testdir/shared.vim +++ b/src/testdir/shared.vim @@ -215,3 +215,7 @@ func RunVimPiped(before, after, arguments, pipecmd) endif return 1 endfunc + +func CanRunGui() + return has('gui') && ($DISPLAY != "" || has('gui_running')) +endfunc |