aboutsummaryrefslogtreecommitdiff
path: root/test/functional/core
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-02-18 19:59:06 +0100
committerGitHub <noreply@github.com>2018-02-18 19:59:06 +0100
commit71e89cec236f9c275cbb20181cd9f33c5d158c66 (patch)
tree655024efab66b6851cf3f031473a7252f20eb367 /test/functional/core
parent8b543d09d834994f7e696716ce8c146ab0652011 (diff)
parent7973847d025aa7af431f1e92c1ee977ceb0eb7e5 (diff)
downloadrneovim-71e89cec236f9c275cbb20181cd9f33c5d158c66.tar.gz
rneovim-71e89cec236f9c275cbb20181cd9f33c5d158c66.tar.bz2
rneovim-71e89cec236f9c275cbb20181cd9f33c5d158c66.zip
Merge #8018 from justinmk/test-eq_any
Diffstat (limited to 'test/functional/core')
-rw-r--r--test/functional/core/job_spec.lua27
1 files changed, 22 insertions, 5 deletions
diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua
index a02d36c939..73d437169a 100644
--- a/test/functional/core/job_spec.lua
+++ b/test/functional/core/job_spec.lua
@@ -12,6 +12,7 @@ local get_pathsep = helpers.get_pathsep
local pathroot = helpers.pathroot
local nvim_set = helpers.nvim_set
local expect_twostreams = helpers.expect_twostreams
+local expect_msg_seq = helpers.expect_msg_seq
local Screen = require('test.functional.ui.screen')
describe('jobs', function()
@@ -78,9 +79,18 @@ describe('jobs', function()
else
nvim('command', "let j = jobstart('pwd', g:job_opts)")
end
- eq({'notification', 'stdout', {0, {dir, ''}}}, next_msg())
- eq({'notification', 'stdout', {0, {''}}}, next_msg())
- eq({'notification', 'exit', {0, 0}}, next_msg())
+ expect_msg_seq(
+ { {'notification', 'stdout', {0, {dir, ''} } },
+ {'notification', 'stdout', {0, {''} } },
+ {'notification', 'exit', {0, 0} }
+ },
+ -- Alternative sequence:
+ { {'notification', 'stdout', {0, {dir} } },
+ {'notification', 'stdout', {0, {'', ''} } },
+ {'notification', 'stdout', {0, {''} } },
+ {'notification', 'exit', {0, 0} }
+ }
+ )
rmdir(dir)
end)
@@ -308,8 +318,15 @@ describe('jobs', function()
nvim('command', 'unlet g:job_opts.on_exit')
nvim('command', 'let g:job_opts.user = 5')
nvim('command', [[call jobstart('echo "foo"', g:job_opts)]])
- eq({'notification', 'stdout', {5, {'foo', ''}}}, next_msg())
- eq({'notification', 'stdout', {5, {''}}}, next_msg())
+ expect_msg_seq(
+ { {'notification', 'stdout', {5, {'foo', ''} } },
+ {'notification', 'stdout', {5, {''} } }
+ },
+ -- Alternative sequence:
+ { {'notification', 'stdout', {5, {'foo'} } },
+ {'notification', 'stdout', {5, {'', ''} } }
+ }
+ )
end)
it('will pass return code with the exit event', function()