test: use unix fileformat to test NULs on systemlist

This commit is contained in:
Jan Edmund Lazo
2017-10-24 17:38:18 -04:00
committed by Justin M. Keyes
parent 7311fb7cad
commit 8d58012786

View File

@@ -442,11 +442,13 @@ describe('systemlist()', function()
describe('with output containing NULs', function()
local fname = 'Xtest'
before_each(create_file_with_nuls(fname))
before_each(function()
command('set ff=unix')
create_file_with_nuls(fname)()
end)
after_each(delete_file(fname))
it('replaces NULs by newline characters', function()
if helpers.pending_win32(pending) then return end
eq({'part1\npart2\npart3'}, eval('systemlist("cat '..fname..'")'))
end)
end)