fix(NVIM_APPNAME): show error message if $NVIM_APPNAME is invalid

Closes https://github.com/neovim/neovim/issues/23056.
This commit is contained in:
Ghjuvan Lacambre
2023-05-28 16:04:54 +02:00
committed by GitHub
parent d561830a52
commit 5a3752889c
3 changed files with 23 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ local ok = helpers.ok
local funcs = helpers.funcs
local insert = helpers.insert
local neq = helpers.neq
local nvim_prog = helpers.nvim_prog
local mkdir = helpers.mkdir
local rmdir = helpers.rmdir
local alter_slashes = helpers.alter_slashes
@@ -603,6 +604,10 @@ describe('stdpath()', function()
eq(appname, funcs.fnamemodify(funcs.stdpath('data_dirs')[1], ':t'))
end
assert_alive() -- Check for crash. #8393
-- Check that nvim rejects invalid APPNAMEs
local child = funcs.jobstart({ nvim_prog }, {env={NVIM_APPNAME='a/b\\c'}})
eq(1, funcs.jobwait({child}, 3000)[1])
end)
context('returns a String', function()