mirror of
https://github.com/neovim/neovim.git
synced 2025-09-08 04:18:18 +00:00
test(job): Ensure job-specific env var overrides global env var
This commit is contained in:
@@ -63,6 +63,7 @@ describe('jobs', function()
|
|||||||
|
|
||||||
it('append environment #env', function()
|
it('append environment #env', function()
|
||||||
nvim('command', "let $VAR = 'abc'")
|
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.env = {'TOTO': 'hello world'}")
|
||||||
if iswin() then
|
if iswin() then
|
||||||
nvim('command', [[call jobstart('echo %TOTO% %VAR%', g:job_opts)]])
|
nvim('command', [[call jobstart('echo %TOTO% %VAR%', g:job_opts)]])
|
||||||
@@ -77,6 +78,7 @@ describe('jobs', function()
|
|||||||
|
|
||||||
it('append environment with pty #env', function()
|
it('append environment with pty #env', function()
|
||||||
nvim('command', "let $VAR = 'abc'")
|
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.pty = v:true")
|
||||||
nvim('command', "let g:job_opts.env = {'TOTO': 'hello world'}")
|
nvim('command', "let g:job_opts.env = {'TOTO': 'hello world'}")
|
||||||
if iswin() then
|
if iswin() then
|
||||||
@@ -91,6 +93,7 @@ describe('jobs', function()
|
|||||||
|
|
||||||
it('replace environment #env', function()
|
it('replace environment #env', function()
|
||||||
nvim('command', "let $VAR = 'abc'")
|
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.env = {'TOTO': 'hello world'}")
|
||||||
nvim('command', "let g:job_opts.clear_env = 1")
|
nvim('command', "let g:job_opts.clear_env = 1")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user