aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval/exepath_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-04-02 12:40:36 +0200
committerGitHub <noreply@github.com>2019-04-02 12:40:36 +0200
commit8eaa452073a1be59234642dba347316226f1dcb1 (patch)
tree38ed586e8801ff20929fb03c3995ddf2c936904a /test/functional/eval/exepath_spec.lua
parent35362495c965554f45634bcde3c4ce6d5eca52aa (diff)
parentc7039fd0d3f6f5d7c8699fd88095e100f0754e59 (diff)
downloadrneovim-8eaa452073a1be59234642dba347316226f1dcb1.tar.gz
rneovim-8eaa452073a1be59234642dba347316226f1dcb1.tar.bz2
rneovim-8eaa452073a1be59234642dba347316226f1dcb1.zip
Merge #9516 from erw7/improve-executable-on-windows
Improve executable() and exepath() on windows
Diffstat (limited to 'test/functional/eval/exepath_spec.lua')
-rw-r--r--test/functional/eval/exepath_spec.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/eval/exepath_spec.lua b/test/functional/eval/exepath_spec.lua
new file mode 100644
index 0000000000..10a11aeacc
--- /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 if omitted', function()
+ local filename = 'cmd'
+ local pathext = '.exe'
+ clear({env={PATHEXT=pathext}})
+ eq(call('exepath', filename..pathext), call('exepath', filename))
+ end)
+end)