diff options
Diffstat (limited to 'test/functional/eval/executable_spec.lua')
-rw-r--r-- | test/functional/eval/executable_spec.lua | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/functional/eval/executable_spec.lua b/test/functional/eval/executable_spec.lua index 1107fe6a0b..a1cf056907 100644 --- a/test/functional/eval/executable_spec.lua +++ b/test/functional/eval/executable_spec.lua @@ -2,6 +2,7 @@ local helpers = require('test.functional.helpers')(after_each) local eq, clear, call, iswin, write_file, command = helpers.eq, helpers.clear, helpers.call, helpers.iswin, helpers.write_file, helpers.command +local eval = helpers.eval describe('executable()', function() before_each(clear) @@ -95,10 +96,16 @@ describe('executable() (Windows)', function() eq(0, call('executable', '.\\test_executable_zzz')) end) + it('system([…]), jobstart([…]) use $PATHEXT #9569', function() + -- 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() -- Some executable we can expect in the test env. local exe = 'printargs-test' - local exedir = helpers.eval("fnamemodify(v:progpath, ':h')") + local exedir = eval("fnamemodify(v:progpath, ':h')") local exepath = exedir..'/'..exe..'.exe' eq(1, call('executable', exepath)) eq('arg1=lemon;arg2=sky;arg3=tree;', @@ -108,7 +115,7 @@ describe('executable() (Windows)', function() it('full path without extension', function() -- Some executable we can expect in the test env. local exe = 'printargs-test' - local exedir = helpers.eval("fnamemodify(v:progpath, ':h')") + local exedir = eval("fnamemodify(v:progpath, ':h')") local exepath = exedir..'/'..exe eq('arg1=lemon;arg2=sky;arg3=tree;', call('system', exepath..' lemon sky tree')) |