mirror of
https://github.com/neovim/neovim.git
synced 2025-09-10 21:38:19 +00:00

os_env_exists() fails on MSVC build: os_env_exists:104: uv_os_getenv(EMPTY_VAR) failed: -4094 UNKNOWN - Revert396a3945c4
- HACK: Windows: return TRUE if uv_os_getenv() returns UV_UNKNOWN, until libuv bug is fixed: https://github.com/libuv/libuv/issues/2413 ref396a3945c4 (r34642361)
19 lines
572 B
Lua
19 lines
572 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)
|