test: system(): fix test

For the test to be valid it should actually send input.

ref #3529
ref #5241
This commit is contained in:
Justin M. Keyes 2018-01-23 21:33:44 +01:00
parent 6762c20af8
commit 15119f943a

View File

@ -251,7 +251,7 @@ describe('system()', function()
end) end)
it('to backgrounded command does not crash', function() it('to backgrounded command does not crash', function()
-- This is indeterminate, just exercise the codepath. May get E5677. -- 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*:") local v_errnum = string.match(eval("v:errmsg"), "^E%d*:")
if v_errnum then if v_errnum then
eq("E5677:", v_errnum) eq("E5677:", v_errnum)