aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval/environ_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-08-10 01:43:37 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-08-10 01:43:37 +0200
commit396a3945c4eba733b3a99a7ded217af83a400791 (patch)
treec26b568b22cf56128dabe299851cef2d3667b172 /test/functional/eval/environ_spec.lua
parent43a8242cd538ebdb838007dc3d303a37e2bc9944 (diff)
downloadrneovim-396a3945c4eba733b3a99a7ded217af83a400791.tar.gz
rneovim-396a3945c4eba733b3a99a7ded217af83a400791.tar.bz2
rneovim-396a3945c4eba733b3a99a7ded217af83a400791.zip
test/environ_spec: Windows treats empty as undefined
ref #10657
Diffstat (limited to 'test/functional/eval/environ_spec.lua')
-rw-r--r--test/functional/eval/environ_spec.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/functional/eval/environ_spec.lua b/test/functional/eval/environ_spec.lua
index 4c2adcf1bf..84564d9f93 100644
--- a/test/functional/eval/environ_spec.lua
+++ b/test/functional/eval/environ_spec.lua
@@ -3,6 +3,7 @@ local clear = helpers.clear
local eq = helpers.eq
local environ = helpers.funcs.environ
local exists = helpers.funcs.exists
+local iswin = helpers.iswin
describe('environment variables', function()
it('environ() handles empty env variable', function()
@@ -11,8 +12,8 @@ describe('environment variables', function()
eq(nil, environ()['DOES_NOT_EXIST'])
end)
it('exists() handles empty env variable', function()
- clear({env={EMPTY_VAR=""}})
- eq(1, exists('$EMPTY_VAR'))
+ clear({env={EMPTY_VAR=""}}) -- Windows treats this as "undefined".
+ eq((iswin() and 0 or 1), exists('$EMPTY_VAR'))
eq(0, exists('$DOES_NOT_EXIST'))
end)
end)