mirror of
https://github.com/neovim/neovim.git
synced 2025-11-23 10:36:29 +00:00
test: fix dependencies between test cases (#23343)
Discovered using --shuffle argument of busted.
This commit is contained in:
@@ -26,6 +26,8 @@ end)
|
||||
describe('empty $HOME', function()
|
||||
local original_home = os.getenv('HOME')
|
||||
|
||||
before_each(clear)
|
||||
|
||||
-- recover $HOME after each test
|
||||
after_each(function()
|
||||
if original_home ~= nil then
|
||||
|
||||
@@ -137,12 +137,16 @@ describe('executable() (Windows)', function()
|
||||
end)
|
||||
|
||||
it('system([…]), jobstart([…]) use $PATHEXT #9569', function()
|
||||
-- Empty $PATHEXT defaults to ".com;.exe;.bat;.cmd".
|
||||
clear({env={PATHEXT=''}})
|
||||
-- Invoking `cmdscript` should find/execute `cmdscript.cmd`.
|
||||
eq('much success\n', call('system', {'test/functional/fixtures/cmdscript'}))
|
||||
assert(0 < call('jobstart', {'test/functional/fixtures/cmdscript'}))
|
||||
end)
|
||||
|
||||
it('full path with extension', function()
|
||||
-- Empty $PATHEXT defaults to ".com;.exe;.bat;.cmd".
|
||||
clear({env={PATHEXT=''}})
|
||||
-- Some executable we can expect in the test env.
|
||||
local exe = 'printargs-test'
|
||||
local exedir = eval("fnamemodify(v:progpath, ':h')")
|
||||
@@ -153,6 +157,8 @@ describe('executable() (Windows)', function()
|
||||
end)
|
||||
|
||||
it('full path without extension', function()
|
||||
-- Empty $PATHEXT defaults to ".com;.exe;.bat;.cmd".
|
||||
clear({env={PATHEXT=''}})
|
||||
-- Some executable we can expect in the test env.
|
||||
local exe = 'printargs-test'
|
||||
local exedir = eval("fnamemodify(v:progpath, ':h')")
|
||||
|
||||
Reference in New Issue
Block a user