aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/server_requests_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-01-14 09:47:33 +0100
committerJustin M. Keyes <justinkz@gmail.com>2017-01-19 09:55:57 +0100
commite40946a5be2ce11156fc7494ec81040d3cde4809 (patch)
tree02b2c35a2d9f7f83db8acc3650d006544d1f4e16 /test/functional/api/server_requests_spec.lua
parent75e6af44e03e706df896df8b57d8e29c9a0d0f41 (diff)
downloadrneovim-e40946a5be2ce11156fc7494ec81040d3cde4809.tar.gz
rneovim-e40946a5be2ce11156fc7494ec81040d3cde4809.tar.bz2
rneovim-e40946a5be2ce11156fc7494ec81040d3cde4809.zip
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>
Diffstat (limited to 'test/functional/api/server_requests_spec.lua')
-rw-r--r--test/functional/api/server_requests_spec.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/api/server_requests_spec.lua b/test/functional/api/server_requests_spec.lua
index aa91cd1396..76a335a8f4 100644
--- a/test/functional/api/server_requests_spec.lua
+++ b/test/functional/api/server_requests_spec.lua
@@ -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)