Files
neovim/test/functional/eval/environ_spec.lua
Daniel Hahler d55b12ea50 f_environ: cleanup/refactor
- use os_getenvname_at_index / os_getenv
- f_getenv: empty (*p == NUL) is not null (undefined)
2019-08-06 01:23:11 +02:00

13 lines
351 B
Lua

local helpers = require('test.functional.helpers')(after_each)
local clear = helpers.clear
local eq = helpers.eq
local environ = helpers.funcs.environ
describe('environ()', function()
it('handles empty env variable', function()
clear({env={EMPTY_VAR=""}})
eq("", environ()['EMPTY_VAR'])
eq(nil, environ()['DOES_NOT_EXIST'])
end)
end)