1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
From: James McCoy <jamessan@jamessan.com>
Date: Sat, 16 Jul 2022 14:08:27 -0400
X-Dgit-Generated: 0.7.2-5 8c7b046f81bab7c202c59ed2bfc64d458ee8a157
Subject: 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.
---
diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua
index d443e06e0..12bb4d24d 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()
|