diff options
author | James McCoy <jamessan@jamessan.com> | 2019-12-12 07:26:39 -0500 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2019-12-12 07:57:27 -0500 |
commit | 91b313a904c039a9b6a53a7afc9f66e67a1e12fc (patch) | |
tree | 8d889a35b0c52cea3f3a9c465d6c14f23d9e26b8 /test/functional/core/job_spec.lua | |
parent | 39963c6a04afc417a821b2255a5caea4b7955d7d (diff) | |
download | rneovim-91b313a904c039a9b6a53a7afc9f66e67a1e12fc.tar.gz rneovim-91b313a904c039a9b6a53a7afc9f66e67a1e12fc.tar.bz2 rneovim-91b313a904c039a9b6a53a7afc9f66e67a1e12fc.zip |
Add negative test for type of job's env option
Diffstat (limited to 'test/functional/core/job_spec.lua')
-rw-r--r-- | test/functional/core/job_spec.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua index af2299945e..e5d4444b92 100644 --- a/test/functional/core/job_spec.lua +++ b/test/functional/core/job_spec.lua @@ -49,6 +49,18 @@ describe('jobs', function() ]]) end) + it('must specify env option as a dict', function() + command("let g:job_opts.env = v:true") + local _, err = pcall(function() + if iswin() then + nvim('command', "let j = jobstart('set', g:job_opts)") + else + nvim('command', "let j = jobstart('env', g:job_opts)") + end + end) + ok(string.find(err, "E475: Invalid argument: env") ~= nil) + end) + it('append environment #env', function() nvim('command', "let $VAR = 'abc'") nvim('command', "let g:job_opts.env = {'TOTO': 'hello world'}") |