os_system(): do not set up input stream for empty string #7951

Test failure:
test/functional/eval/system_spec.lua: "works with an empty string"
E5677: Error writing input to shell-command: EPIPE

ref https://github.com/neovim/neovim/pull/6558#issuecomment-361061035
ref #6554
This commit is contained in:
Justin M. Keyes
2018-01-31 10:25:51 +01:00
parent ec7cbabf01
commit 648fed975e
2 changed files with 6 additions and 4 deletions

View File

@@ -260,6 +260,7 @@ describe('system()', function()
end)
it('works with an empty string', function()
eq("test\n", eval('system("echo test", "")'))
eq(2, eval("1+1")) -- Still alive?
end)
end)