mirror of
https://github.com/neovim/neovim.git
synced 2025-12-11 09:02:40 +00:00
test/shell: Add failure tests for system().
This commit is contained in:
committed by
Thiago de Arruda
parent
dd4263a0c8
commit
860b6f6f05
@@ -39,6 +39,8 @@ describe('system()', function()
|
|||||||
eq(1, eval('v:shell_error'))
|
eq(1, eval('v:shell_error'))
|
||||||
eval([[system("sh -c 'exit 5'")]])
|
eval([[system("sh -c 'exit 5'")]])
|
||||||
eq(5, eval('v:shell_error'))
|
eq(5, eval('v:shell_error'))
|
||||||
|
eval([[system('this-should-not-exist')]])
|
||||||
|
eq(127, eval('v:shell_error'))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe('passing no input', function()
|
describe('passing no input', function()
|
||||||
@@ -117,6 +119,8 @@ describe('systemlist()', function()
|
|||||||
eq(1, eval('v:shell_error'))
|
eq(1, eval('v:shell_error'))
|
||||||
eval([[systemlist("sh -c 'exit 5'")]])
|
eval([[systemlist("sh -c 'exit 5'")]])
|
||||||
eq(5, eval('v:shell_error'))
|
eq(5, eval('v:shell_error'))
|
||||||
|
eval([[systemlist('this-should-not-exist')]])
|
||||||
|
eq(127, eval('v:shell_error'))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe('passing string with linefeed characters as input', function()
|
describe('passing string with linefeed characters as input', function()
|
||||||
|
|||||||
Reference in New Issue
Block a user