aboutsummaryrefslogtreecommitdiff
path: root/test/functional/core/job_spec.lua
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2020-07-31 01:17:24 -0400
committerJames McCoy <jamessan@jamessan.com>2021-01-31 07:54:20 -0500
commit7f50c692685c92d47e6ba6c3ee5f6fdccb78fec5 (patch)
tree2d1eda8d6437d4d339c244681fdb5b7ff5418c21 /test/functional/core/job_spec.lua
parent55add1c1c8a9a040f02a880096ca153f7db3e501 (diff)
downloadrneovim-7f50c692685c92d47e6ba6c3ee5f6fdccb78fec5.tar.gz
rneovim-7f50c692685c92d47e6ba6c3ee5f6fdccb78fec5.tar.bz2
rneovim-7f50c692685c92d47e6ba6c3ee5f6fdccb78fec5.zip
Use dict_T to pass env vars to process spawning code
Co-authored-by: Matthieu Coudron <mattator@gmail.com>
Diffstat (limited to 'test/functional/core/job_spec.lua')
-rw-r--r--test/functional/core/job_spec.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua
index 6d1182478a..3f7595c149 100644
--- a/test/functional/core/job_spec.lua
+++ b/test/functional/core/job_spec.lua
@@ -75,6 +75,20 @@ describe('jobs', function()
})
end)
+ it('append environment with pty #env', function()
+ nvim('command', "let $VAR = 'abc'")
+ nvim('command', "let g:job_opts.pty = v:true")
+ nvim('command', "let g:job_opts.env = {'TOTO': 'hello world'}")
+ if iswin() then
+ nvim('command', [[call jobstart('echo %TOTO% %VAR%', g:job_opts)]])
+ else
+ nvim('command', [[call jobstart('echo $TOTO $VAR', g:job_opts)]])
+ end
+ expect_msg_seq({
+ {'notification', 'stdout', {0, {'hello world abc', ''}}},
+ })
+ end)
+
it('replace environment #env', function()
nvim('command', "let $VAR = 'abc'")
nvim('command', "let g:job_opts.env = {'TOTO': 'hello world'}")