diff options
author | Daniel Hahler <git@thequod.de> | 2019-08-09 15:34:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-09 15:34:06 +0200 |
commit | 939d9053bdf2f56286640c581eb4e2ff5a856540 (patch) | |
tree | 8ba6e3bbda157caad29732b0b619566037db1644 /test/functional/core/job_spec.lua | |
parent | fa0c677a63079e5d27ff037ea8f1e23a71fe6680 (diff) | |
download | rneovim-939d9053bdf2f56286640c581eb4e2ff5a856540.tar.gz rneovim-939d9053bdf2f56286640c581eb4e2ff5a856540.tar.bz2 rneovim-939d9053bdf2f56286640c581eb4e2ff5a856540.zip |
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.
Diffstat (limited to 'test/functional/core/job_spec.lua')
-rw-r--r-- | test/functional/core/job_spec.lua | 21 |
1 files changed, 5 insertions, 16 deletions
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) |