patch 8.2.3109: check for $DISPLAY never fails
Problem: Check for $DISPLAY never fails.
Solution: Use eval().
diff --git a/src/testdir/check.vim b/src/testdir/check.vim
index 504a192..6d2d564 100644
--- a/src/testdir/check.vim
+++ b/src/testdir/check.vim
@@ -139,7 +139,7 @@
" Command to Check for an environment variable
command -nargs=1 CheckEnv call CheckEnv(<f-args>)
func CheckEnv(name)
- if empty('$' .. a:name)
+ if empty(eval('$' .. a:name))
throw 'Skipped: Environment variable ' .. a:name .. ' is not set'
endif
endfunc