mirror of
https://github.com/neovim/neovim.git
synced 2024-12-22 04:05:09 -07:00
bb6b1267e7
This reverts commit 278c5d452c
.
20 lines
573 B
Lua
20 lines
573 B
Lua
local helpers = require('test.functional.helpers')(after_each)
|
|
local clear = helpers.clear
|
|
local eq = helpers.eq
|
|
local environ = helpers.funcs.environ
|
|
local exists = helpers.funcs.exists
|
|
|
|
describe('environment variables', function()
|
|
it('environ() handles empty env variable', function()
|
|
clear({env={EMPTY_VAR=""}})
|
|
eq("", environ()['EMPTY_VAR'])
|
|
eq(nil, environ()['DOES_NOT_EXIST'])
|
|
end)
|
|
|
|
it('exists() handles empty env variable', function()
|
|
clear({env={EMPTY_VAR=""}})
|
|
eq(1, exists('$EMPTY_VAR'))
|
|
eq(0, exists('$DOES_NOT_EXIST'))
|
|
end)
|
|
end)
|