test/functional/eval: assert that executable() fixtures are executable

This commit is contained in:
Jan Edmund Lazo
2020-12-11 22:59:43 -05:00
parent 5ccc79e880
commit da58242fb8
2 changed files with 16 additions and 0 deletions

View File

@@ -11,6 +11,10 @@ describe('executable()', function()
it('returns 1 for commands in $PATH', function()
local exe = iswin() and 'ping' or 'ls'
eq(1, call('executable', exe))
command('let $PATH = fnamemodify("./test/functional/fixtures/bin", ":p")')
eq(1, call('executable', 'null'))
eq(1, call('executable', 'true'))
eq(1, call('executable', 'false'))
end)
it('fails for invalid values', function()