mirror of
https://github.com/neovim/neovim.git
synced 2025-12-09 16:12:48 +00:00
eval: save_tv_as_string: Correctly handle an empty string
When tv_get_string_chk returns a non-NULL value, we have a valid string. Propagating an error state (*len = -1, NULL return) for an empty string is invalid. Closes #6554
This commit is contained in:
@@ -258,6 +258,9 @@ describe('system()', function()
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user