aboutsummaryrefslogtreecommitdiff
path: root/test/functional/shell/viml_system_spec.lua
diff options
context:
space:
mode:
authorScott Prager <splinterofchaos@gmail.com>2014-10-27 15:11:44 -0400
committerThiago de Arruda <tpadilha84@gmail.com>2014-10-28 14:09:28 -0300
commit860b6f6f05690b6aa37364f339ac4920db3c39ac (patch)
tree713a604b3b16dad85349864f5140eb32ad4f56b0 /test/functional/shell/viml_system_spec.lua
parentdd4263a0c8db328387c6acd1c8a10c9ed5a73248 (diff)
downloadrneovim-860b6f6f05690b6aa37364f339ac4920db3c39ac.tar.gz
rneovim-860b6f6f05690b6aa37364f339ac4920db3c39ac.tar.bz2
rneovim-860b6f6f05690b6aa37364f339ac4920db3c39ac.zip
test/shell: Add failure tests for `system()`.
Diffstat (limited to 'test/functional/shell/viml_system_spec.lua')
-rw-r--r--test/functional/shell/viml_system_spec.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/shell/viml_system_spec.lua b/test/functional/shell/viml_system_spec.lua
index 9ed1016f73..a8bab8e26e 100644
--- a/test/functional/shell/viml_system_spec.lua
+++ b/test/functional/shell/viml_system_spec.lua
@@ -39,6 +39,8 @@ describe('system()', function()
eq(1, eval('v:shell_error'))
eval([[system("sh -c 'exit 5'")]])
eq(5, eval('v:shell_error'))
+ eval([[system('this-should-not-exist')]])
+ eq(127, eval('v:shell_error'))
end)
describe('passing no input', function()
@@ -117,6 +119,8 @@ describe('systemlist()', function()
eq(1, eval('v:shell_error'))
eval([[systemlist("sh -c 'exit 5'")]])
eq(5, eval('v:shell_error'))
+ eval([[systemlist('this-should-not-exist')]])
+ eq(127, eval('v:shell_error'))
end)
describe('passing string with linefeed characters as input', function()