Christian wrote:
> On Mo, 05 Jul 2021, Elimar Riesebieter wrote: > > > Hi Bram, > > > > * Bram Moolenaar <[email protected]> [2021-07-05 14:10 +0200]: > > > > > > > > Patch 8.2.3108 > > > Problem: Test for remote_foreground() fails. (Elimar Riesebieter) > > > Solution: Check that $DISPLAY is set. (Christian Brabandt) > > > Files: src/testdir/check.vim, src/testdir/test_clientserver.vim, > > > src/testdir/test_vim9_builtin.vim > > > > > > > your patch differs from Christian's version. Compiling 8.2.3108 gives > > me: > > Yes, I also wondered about some of the changes. The problem is, when > using empty and quoting the argument, the result cannot be true anymore > > So I think it needs this change: > > diff --git a/src/testdir/check.vim b/src/testdir/check.vim > index 504a1928e..b2f457074 100644 > --- a/src/testdir/check.vim > +++ b/src/testdir/check.vim > @@ -139,7 +139,7 @@ endfunc > " Command to Check for an environment variable > command -nargs=1 CheckEnv call CheckEnv(<f-args>) > func CheckEnv(name) > - if empty('$' .. a:name) > + if empty($ .. a:name) > throw 'Skipped: Environment variable ' .. a:name .. ' is not set' > endif > endfunc > > or change the test to use exists() Sorry, I tried to combine it with an existing test for $DISPLAY. That one used empty(), because it's possible that the environment variable exists but is empty. However, the way I wrote it, it checks if the string '$DISPLAY' is empty. It needs using eval(). -- >From "know your smileys": (X0||) Double hamburger with lettuce and tomato /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202107051550.165FoYZY2831597%40masaka.moolenaar.net.
