From adcf7a221984d61fc472c12875930783bef4e97a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 5 Dec 2022 09:50:27 +0800 Subject: vim-patch:8.2.3108: test for remote_foreground() fails Problem: Test for remote_foreground() fails. (Elimar Riesebieter) Solution: Check that $DISPLAY is set. (Christian Brabandt) https://github.com/vim/vim/commit/d6fa7bd5b900dd363d3a824e0ebe3619a1634df6 Co-authored-by: Bram Moolenaar --- src/nvim/testdir/check.vim | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/nvim/testdir/check.vim') diff --git a/src/nvim/testdir/check.vim b/src/nvim/testdir/check.vim index 61d3a99a67..0fba0e107b 100644 --- a/src/nvim/testdir/check.vim +++ b/src/nvim/testdir/check.vim @@ -123,6 +123,14 @@ func CheckCanRunGui() endif endfunc +" Command to Check for an environment variable +command -nargs=1 CheckEnv call CheckEnv() +func CheckEnv(name) + if empty('$' .. a:name) + throw 'Skipped: Environment variable ' .. a:name .. ' is not set' + endif +endfunc + " Command to check that we are using the GUI command CheckGui call CheckGui() func CheckGui() -- cgit