aboutsummaryrefslogtreecommitdiff
path: root/test/functional/core
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-03-11 19:53:05 +0100
committerGitHub <noreply@github.com>2018-03-11 19:53:05 +0100
commit241c380da93835081e2c1a072d0a281245dd0af4 (patch)
tree40dc6f1f17d7765b88e36782a785a1124b6bab01 /test/functional/core
parenta2d1e9cc795c651864339a7197a748806f8af5eb (diff)
parentb0b656dd37567dea5e3f58e7821c7442831403cb (diff)
downloadrneovim-241c380da93835081e2c1a072d0a281245dd0af4.tar.gz
rneovim-241c380da93835081e2c1a072d0a281245dd0af4.tar.bz2
rneovim-241c380da93835081e2c1a072d0a281245dd0af4.zip
Merge #8117 'build/CI/MSVC/LuaRocks'
Diffstat (limited to 'test/functional/core')
-rw-r--r--test/functional/core/channels_spec.lua2
-rw-r--r--test/functional/core/job_spec.lua46
2 files changed, 39 insertions, 9 deletions
diff --git a/test/functional/core/channels_spec.lua b/test/functional/core/channels_spec.lua
index e9fc88c01b..f79f208b69 100644
--- a/test/functional/core/channels_spec.lua
+++ b/test/functional/core/channels_spec.lua
@@ -1,7 +1,7 @@
local helpers = require('test.functional.helpers')(after_each)
local clear, eq, eval, next_msg, ok, source = helpers.clear, helpers.eq,
- helpers.eval, helpers.next_message, helpers.ok, helpers.source
+ helpers.eval, helpers.next_msg, helpers.ok, helpers.source
local command, funcs, meths = helpers.command, helpers.funcs, helpers.meths
local sleep = helpers.sleep
local spawn, nvim_argv = helpers.spawn, helpers.nvim_argv
diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua
index e3c93d4b5a..c5326aedfe 100644
--- a/test/functional/core/job_spec.lua
+++ b/test/functional/core/job_spec.lua
@@ -2,7 +2,7 @@ local helpers = require('test.functional.helpers')(after_each)
local clear, eq, eval, exc_exec, feed_command, feed, insert, neq, next_msg, nvim,
nvim_dir, ok, source, write_file, mkdir, rmdir = helpers.clear,
helpers.eq, helpers.eval, helpers.exc_exec, helpers.feed_command, helpers.feed,
- helpers.insert, helpers.neq, helpers.next_message, helpers.nvim,
+ helpers.insert, helpers.neq, helpers.next_msg, helpers.nvim,
helpers.nvim_dir, helpers.ok, helpers.source,
helpers.write_file, helpers.mkdir, helpers.rmdir
local command = helpers.command
@@ -292,8 +292,16 @@ describe('jobs', function()
nvim('command', 'let g:job_opts.user = {"n": 5, "s": "str", "l": [1]}')
nvim('command', [[call jobstart('echo "foo"', g:job_opts)]])
local data = {n = 5, s = 'str', l = {1}}
- eq({'notification', 'stdout', {data, {'foo', ''}}}, next_msg())
- eq({'notification', 'stdout', {data, {''}}}, next_msg())
+ expect_msg_seq(
+ { {'notification', 'stdout', {data, {'foo', ''}}},
+ {'notification', 'stdout', {data, {''}}},
+ },
+ -- Alternative sequence:
+ { {'notification', 'stdout', {data, {'foo'}}},
+ {'notification', 'stdout', {data, {'', ''}}},
+ {'notification', 'stdout', {data, {''}}},
+ }
+ )
eq({'notification', 'exit', {data, 0}}, next_msg())
end)
@@ -310,11 +318,12 @@ describe('jobs', function()
nvim('command', [[call jobstart('echo "foo"', g:job_opts)]])
expect_msg_seq(
{ {'notification', 'stdout', {5, {'foo', ''} } },
- {'notification', 'stdout', {5, {''} } }
+ {'notification', 'stdout', {5, {''} } },
},
-- Alternative sequence:
{ {'notification', 'stdout', {5, {'foo'} } },
- {'notification', 'stdout', {5, {'', ''} } }
+ {'notification', 'stdout', {5, {'', ''} } },
+ {'notification', 'stdout', {5, {''} } },
}
)
end)
@@ -417,7 +426,14 @@ describe('jobs', function()
let g:job_opts = {'on_stdout': Callback}
call jobstart('echo "some text"', g:job_opts)
]])
- eq({'notification', '1', {'foo', 'bar', {'some text', ''}, 'stdout'}}, next_msg())
+ expect_msg_seq(
+ { {'notification', '1', {'foo', 'bar', {'some text', ''}, 'stdout'}},
+ },
+ -- Alternative sequence:
+ { {'notification', '1', {'foo', 'bar', {'some text'}, 'stdout'}},
+ {'notification', '1', {'foo', 'bar', {'', ''}, 'stdout'}},
+ }
+ )
end)
it('jobstart() works with closures', function()
@@ -430,7 +446,14 @@ describe('jobs', function()
let g:job_opts = {'on_stdout': MkFun()}
call jobstart('echo "some text"', g:job_opts)
]])
- eq({'notification', '1', {'foo', 'bar', {'some text', ''}, 'stdout'}}, next_msg())
+ expect_msg_seq(
+ { {'notification', '1', {'foo', 'bar', {'some text', ''}, 'stdout'}},
+ },
+ -- Alternative sequence:
+ { {'notification', '1', {'foo', 'bar', {'some text'}, 'stdout'}},
+ {'notification', '1', {'foo', 'bar', {'', ''}, 'stdout'}},
+ }
+ )
end)
it('jobstart() works when closure passed directly to `jobstart`', function()
@@ -438,7 +461,14 @@ describe('jobs', function()
let g:job_opts = {'on_stdout': {id, data, event -> rpcnotify(g:channel, '1', 'foo', 'bar', Normalize(data), event)}}
call jobstart('echo "some text"', g:job_opts)
]])
- eq({'notification', '1', {'foo', 'bar', {'some text', ''}, 'stdout'}}, next_msg())
+ expect_msg_seq(
+ { {'notification', '1', {'foo', 'bar', {'some text', ''}, 'stdout'}},
+ },
+ -- Alternative sequence:
+ { {'notification', '1', {'foo', 'bar', {'some text'}, 'stdout'}},
+ {'notification', '1', {'foo', 'bar', {'', ''}, 'stdout'}},
+ }
+ )
end)
describe('jobwait', function()