test(job): Ensure job-specific env var overrides global env var

This commit is contained in:
James McCoy 2020-12-28 20:48:15 -05:00
parent a199363be2
commit db734ae994
No known key found for this signature in database
GPG Key ID: DFE691AE331BA3DB

View File

@ -63,6 +63,7 @@ describe('jobs', function()
it('append environment #env', function()
nvim('command', "let $VAR = 'abc'")
nvim('command', "let $TOTO = 'goodbye world'")
nvim('command', "let g:job_opts.env = {'TOTO': 'hello world'}")
if iswin() then
nvim('command', [[call jobstart('echo %TOTO% %VAR%', g:job_opts)]])
@ -77,6 +78,7 @@ describe('jobs', function()
it('append environment with pty #env', function()
nvim('command', "let $VAR = 'abc'")
nvim('command', "let $TOTO = 'goodbye world'")
nvim('command', "let g:job_opts.pty = v:true")
nvim('command', "let g:job_opts.env = {'TOTO': 'hello world'}")
if iswin() then
@ -91,6 +93,7 @@ describe('jobs', function()
it('replace environment #env', function()
nvim('command', "let $VAR = 'abc'")
nvim('command', "let $TOTO = 'goodbye world'")
nvim('command', "let g:job_opts.env = {'TOTO': 'hello world'}")
nvim('command', "let g:job_opts.clear_env = 1")