aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval/environ_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/eval/environ_spec.lua')
-rw-r--r--test/functional/eval/environ_spec.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/eval/environ_spec.lua b/test/functional/eval/environ_spec.lua
new file mode 100644
index 0000000000..eb52f9e2da
--- /dev/null
+++ b/test/functional/eval/environ_spec.lua
@@ -0,0 +1,12 @@
+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)