diff options
-rw-r--r-- | src/nvim/testdir/check.vim | 8 | ||||
-rw-r--r-- | src/nvim/testdir/shared.vim | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/nvim/testdir/check.vim b/src/nvim/testdir/check.vim index b530d3a441..073873bcb0 100644 --- a/src/nvim/testdir/check.vim +++ b/src/nvim/testdir/check.vim @@ -57,3 +57,11 @@ func CheckRunVimInTerminal() throw 'Skipped: cannot run Vim in a terminal window' endif endfunc + +" Command to check that we can run the GUI +command CheckCanRunGui call CheckCanRunGui() +func CheckCanRunGui() + if !has('gui') || ($DISPLAY == "" && !has('gui_running')) + throw 'Skipped: cannot start the GUI' + endif +endfunc diff --git a/src/nvim/testdir/shared.vim b/src/nvim/testdir/shared.vim index 41ff9b2bd6..d56fff1fe8 100644 --- a/src/nvim/testdir/shared.vim +++ b/src/nvim/testdir/shared.vim @@ -329,7 +329,3 @@ func RunVimPiped(before, after, arguments, pipecmd) endif return 1 endfunc - -func CanRunGui() - return has('gui') && ($DISPLAY != "" || has('gui_running')) -endfunc |