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

@@ -1,11 +1,11 @@
-- Tests for some server->client RPC scenarios. Note that unlike with
-- `rpcnotify`, to evaluate `rpcrequest` calls we need the client event loop to
-- be running.
-- Test server -> client RPC scenarios. Note: unlike `rpcnotify`, to evaluate
-- `rpcrequest` calls we need the client event loop to be running.
local helpers = require('test.functional.helpers')(after_each)
local clear, nvim, eval = helpers.clear, helpers.nvim, helpers.eval
local eq, neq, run, stop = helpers.eq, helpers.neq, helpers.run, helpers.stop
local nvim_prog, command, funcs = helpers.nvim_prog, helpers.command, helpers.funcs
local source, next_message = helpers.source, helpers.next_message
local ok = helpers.ok
local meths = helpers.meths
describe('server -> client', function()
@@ -180,7 +180,7 @@ describe('server -> client', function()
it('returns an error if the request failed', function()
local status, err = pcall(eval, "rpcrequest(vim, 'does-not-exist')")
eq(false, status)
eq(true, string.match(err, ': (.*)') == 'Failed to evaluate expression')
ok(nil ~= string.match(err, 'Failed to evaluate expression'))
end)
end)