From d321deb4a9b05e9d81b79ac166274f4a6e7981bf Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 27 Apr 2023 15:51:44 +0800 Subject: test: fix dependencies between test cases (#23343) Discovered using --shuffle argument of busted. --- test/functional/vimscript/executable_spec.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/functional/vimscript/executable_spec.lua') 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')") -- cgit