mirror of
https://github.com/neovim/neovim.git
synced 2025-12-09 16:12:48 +00:00
Use dict_T to pass env vars to process spawning code
Co-authored-by: Matthieu Coudron <mattator@gmail.com>
This commit is contained in:
@@ -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'}")
|
||||
|
||||
Reference in New Issue
Block a user