win: test: enable job_spec.lua

- Default to powershell.
- Avoid hardcoded "-c".
- Remove ^M character from received lines.
- pending_win32(): clear() is unnecessary and it pollutes the tests.

Closes #3973
Helped-by: Rui Abreu Ferreira <raf-ep@gmx.com>
This commit is contained in:
Justin M. Keyes
2017-01-14 09:47:33 +01:00
parent 75e6af44e0
commit e40946a5be
5 changed files with 120 additions and 79 deletions

View File

@@ -169,6 +169,10 @@ local os_name = (function()
end)
end)()
local function iswin()
return os_name() == 'windows'
end
-- Executes a VimL function.
-- Fails on VimL error, but does not update v:errmsg.
local function nvim_call(name, ...)
@@ -502,7 +506,6 @@ end
-- Helper to skip tests. Returns true in Windows systems.
-- pending_fn is pending() from busted
local function pending_win32(pending_fn)
clear()
if uname() == 'Windows' then
if pending_fn ~= nil then
pending_fn('FIXME: Windows', function() end)
@@ -553,6 +556,7 @@ return function(after_each)
source = source,
rawfeed = rawfeed,
insert = insert,
iswin = iswin,
feed = feed,
execute = execute,
eval = nvim_eval,