aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval/system_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/eval/system_spec.lua')
-rw-r--r--test/functional/eval/system_spec.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/functional/eval/system_spec.lua b/test/functional/eval/system_spec.lua
index 4d1630042b..77e7424452 100644
--- a/test/functional/eval/system_spec.lua
+++ b/test/functional/eval/system_spec.lua
@@ -251,13 +251,16 @@ describe('system()', function()
end)
it('to backgrounded command does not crash', function()
-- This is indeterminate, just exercise the codepath. May get E5677.
- feed_command('call system("cat - &")')
+ feed_command('call system("cat - &", "input")')
local v_errnum = string.match(eval("v:errmsg"), "^E%d*:")
if v_errnum then
eq("E5677:", v_errnum)
end
eq(2, eval("1+1")) -- Still alive?
end)
+ it('works with an empty string', function()
+ eq("test\n", eval('system("echo test", "")'))
+ end)
end)
describe('passing a lot of input', function()