From c8f2b10a40f5b63c4222e1525e2ae8d3eddb64e2 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 1 Dec 2025 22:58:12 -0500 Subject: [PATCH] =?UTF-8?q?test:=20unreliable=20"job=20exit=20event=20on?= =?UTF-8?q?=20jobstart(=E2=80=A6,{term=3Dtrue})"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: Test often fails in cirrus (bsd) ci: FAILED test/functional/terminal/channel_spec.lua @ 149: no crash when TermOpen autocommand processes job exit event when using jobstart(…,{term=true}) test/functional/terminal/channel_spec.lua:158: Row 1 did not match. Expected: |*^ready $ foobar | |* | |*[Process exited 0] | | | Actual: |*^ready $ | |*[Process exited 0] | |* | | | Solution: Use one printf call instead of multiple. --- test/functional/fixtures/shell-test.c | 5 +++-- test/functional/terminal/channel_spec.lua | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/functional/fixtures/shell-test.c b/test/functional/fixtures/shell-test.c index f3e94a28da..08da133819 100644 --- a/test/functional/fixtures/shell-test.c +++ b/test/functional/fixtures/shell-test.c @@ -66,9 +66,10 @@ int main(int argc, char **argv) } } } else if (strcmp(argv[1], "EXE") == 0) { - fprintf(stderr, "ready $ "); if (argc >= 3) { - fprintf(stderr, "%s\n", argv[2]); + fprintf(stderr, "ready $ %s\n", argv[2]); + } else { + fprintf(stderr, "ready $ "); } } else if (strcmp(argv[1], "REP") == 0) { if (argc != 4) { diff --git a/test/functional/terminal/channel_spec.lua b/test/functional/terminal/channel_spec.lua index 03a8e4821a..935bd974be 100644 --- a/test/functional/terminal/channel_spec.lua +++ b/test/functional/terminal/channel_spec.lua @@ -146,7 +146,7 @@ describe('no crash when TermOpen autocommand', function() screen = Screen.new(60, 4) end) - it('processes job exit event when using jobstart(…,{term=true})', function() + it('processes job exit event on jobstart(…,{term=true})', function() command([[autocmd TermOpen * call input('')]]) async_meths.nvim_command('terminal foobar') screen:expect([[