From 939d9053bdf2f56286640c581eb4e2ff5a856540 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Fri, 9 Aug 2019 15:34:06 +0200 Subject: channels: reflect exit due to signals in exit status code (#10573) Uses `128 + term_signal` in case of exit due to a signal. Fixes https://github.com/neovim/neovim/issues/10571. --- test/functional/core/job_spec.lua | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'test/functional') diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua index 212b76b5d9..180ed9aa02 100644 --- a/test/functional/core/job_spec.lua +++ b/test/functional/core/job_spec.lua @@ -183,7 +183,7 @@ describe('jobs', function() ) nvim('command', "call jobstop(j)") eq({'notification', 'stdout', {0, {''}}}, next_msg()) - eq({'notification', 'exit', {0, iswin() and 15 or 0}}, next_msg()) + eq({'notification', 'exit', {0, 143}}, next_msg()) end) it('preserves NULs', function() @@ -217,7 +217,7 @@ describe('jobs', function() eq({'notification', 'stdout', {0, {'abc', 'xyz'}}}, next_msg()) nvim('command', "call jobstop(j)") eq({'notification', 'stdout', {0, {''}}}, next_msg()) - eq({'notification', 'exit', {0, iswin() and 15 or 0}}, next_msg()) + eq({'notification', 'exit', {0, 143}}, next_msg()) end) it('preserves newlines', function() @@ -234,7 +234,7 @@ describe('jobs', function() next_msg()) nvim('command', "call jobstop(j)") eq({'notification', 'stdout', {0, {''}}}, next_msg()) - eq({'notification', 'exit', {0, iswin() and 15 or 0}}, next_msg()) + eq({'notification', 'exit', {0, 143}}, next_msg()) end) it('avoids sending final newline', function() @@ -244,7 +244,7 @@ describe('jobs', function() next_msg()) nvim('command', "call jobstop(j)") eq({'notification', 'stdout', {0, {''}}}, next_msg()) - eq({'notification', 'exit', {0, iswin() and 15 or 0}}, next_msg()) + eq({'notification', 'exit', {0, 143}}, next_msg()) end) it('closes the job streams with jobclose', function() @@ -284,18 +284,7 @@ describe('jobs', function() neq(NIL, meths.get_proc(pid)) nvim('command', 'call jobstop(j)') eq({'notification', 'stdout', {0, {''}}}, next_msg()) - if iswin() then - expect_msg_seq( - -- win64 - { {'notification', 'exit', {0, 1}} - }, - -- win32 - { {'notification', 'exit', {0, 15}} - } - ) - else - eq({'notification', 'exit', {0, 0}}, next_msg()) - end + eq({'notification', 'exit', {0, 143}}, next_msg()) eq(NIL, meths.get_proc(pid)) end) -- cgit