test/win: executable(), exepath() #9516

This commit is contained in:
erw7
2019-01-18 14:11:40 +09:00
committed by Justin M. Keyes
parent 35c2ceba96
commit 3be5aa1a34
4 changed files with 68 additions and 13 deletions

View File

@@ -0,0 +1,14 @@
local helpers = require('test.functional.helpers')(after_each)
local eq, clear, call, iswin =
helpers.eq, helpers.clear, helpers.call, helpers.iswin
describe('exepath() (Windows)', function()
if not iswin() then return end -- N/A for Unix.
it('append extension, even if omit extension', function()
local filename = 'cmd'
local pathext = '.exe'
clear({env={PATHEXT=pathext}})
eq(call('exepath', filename..pathext), call('exepath', filename))
end)
end)