aboutsummaryrefslogtreecommitdiff
path: root/test/functional/vimscript/executable_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-27 15:51:44 +0800
committerGitHub <noreply@github.com>2023-04-27 15:51:44 +0800
commitd321deb4a9b05e9d81b79ac166274f4a6e7981bf (patch)
tree195446b3e2668a53edb44e93223905b9939073d6 /test/functional/vimscript/executable_spec.lua
parentd1bb9bffd5e86d30696969e001af3c3db8ed4bcf (diff)
downloadrneovim-d321deb4a9b05e9d81b79ac166274f4a6e7981bf.tar.gz
rneovim-d321deb4a9b05e9d81b79ac166274f4a6e7981bf.tar.bz2
rneovim-d321deb4a9b05e9d81b79ac166274f4a6e7981bf.zip
test: fix dependencies between test cases (#23343)
Discovered using --shuffle argument of busted.
Diffstat (limited to 'test/functional/vimscript/executable_spec.lua')
-rw-r--r--test/functional/vimscript/executable_spec.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/functional/vimscript/executable_spec.lua b/test/functional/vimscript/executable_spec.lua
index 43e4a29e1a..2b8e3f6218 100644
--- a/test/functional/vimscript/executable_spec.lua
+++ b/test/functional/vimscript/executable_spec.lua
@@ -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')")