From 3be5aa1a34f63f4e5e2b384098de2020a4c5b3bc Mon Sep 17 00:00:00 2001 From: erw7 Date: Fri, 18 Jan 2019 14:11:40 +0900 Subject: test/win: executable(), exepath() #9516 --- test/functional/eval/exepath_spec.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/functional/eval/exepath_spec.lua (limited to 'test/functional/eval/exepath_spec.lua') diff --git a/test/functional/eval/exepath_spec.lua b/test/functional/eval/exepath_spec.lua new file mode 100644 index 0000000000..50aa412867 --- /dev/null +++ b/test/functional/eval/exepath_spec.lua @@ -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) -- cgit