aboutsummaryrefslogtreecommitdiff
path: root/test/functional/core/job_spec.lua
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2022-07-16 14:08:27 -0400
committerJames McCoy <jamessan@jamessan.com>2022-07-16 14:08:27 -0400
commitbcb5b7b3f62dcb7777e8b47d8d1f7f99789afaac (patch)
treeb451e0b6fe9493eb2fdb3947c3e9b88b39a4460c /test/functional/core/job_spec.lua
parent711a6a915767a97300aba76fb9d79b9784bc76ce (diff)
downloadrneovim-bcb5b7b3f62dcb7777e8b47d8d1f7f99789afaac.tar.gz
rneovim-bcb5b7b3f62dcb7777e8b47d8d1f7f99789afaac.tar.bz2
rneovim-bcb5b7b3f62dcb7777e8b47d8d1f7f99789afaac.zip
test(job_spec): accept alternate messages for "append environment" tests
These tests commonly fail in Debian with [ ERROR ] test/functional/core/job_spec.lua @ 81: jobs append environment with pty #env test/functional/helpers.lua:198: ============================================================================== test/helpers.lua:73: Expected objects to be the same. Passed in: (table: 0x2aa4bcc1040) { *[1] = { [1] = 'notification' [2] = 'stdout' *[3] = { [1] = 0 *[2] = { [1] = 'hello world abc' } } } } Expected: (table: 0x2aa4bcc0d70) { *[1] = { [1] = 'notification' [2] = 'stdout' *[3] = { [1] = 0 *[2] = { [1] = 'hello world abc' *[2] = '' } } } } Since the test is validating the "hello world abc" message, not the newlines, accept either set of message sequences.
Diffstat (limited to 'test/functional/core/job_spec.lua')
-rw-r--r--test/functional/core/job_spec.lua26
1 files changed, 20 insertions, 6 deletions
diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua
index a6763ba3c7..04fbb807be 100644
--- a/test/functional/core/job_spec.lua
+++ b/test/functional/core/job_spec.lua
@@ -73,9 +73,16 @@ describe('jobs', function()
nvim('command', [[call jobstart('echo $TOTO $VAR', g:job_opts)]])
end
- expect_msg_seq({
- {'notification', 'stdout', {0, {'hello world abc', ''}}},
- })
+ expect_msg_seq(
+ {
+ {'notification', 'stdout', {0, {'hello world abc'}}},
+ {'notification', 'stdout', {0, {'', ''}}},
+ },
+ {
+ {'notification', 'stdout', {0, {'hello world abc', ''}}},
+ {'notification', 'stdout', {0, {''}}}
+ }
+ )
end)
it('append environment with pty #env', function()
@@ -89,9 +96,16 @@ describe('jobs', function()
else
nvim('command', [[call jobstart('echo $TOTO $VAR', g:job_opts)]])
end
- expect_msg_seq({
- {'notification', 'stdout', {0, {'hello world abc', ''}}},
- })
+ expect_msg_seq(
+ {
+ {'notification', 'stdout', {0, {'hello world abc'}}},
+ {'notification', 'stdout', {0, {'', ''}}},
+ },
+ {
+ {'notification', 'stdout', {0, {'hello world abc', ''}}},
+ {'notification', 'stdout', {0, {''}}}
+ }
+ )
end)
it('replace environment #env', function()