tests: Fix repeated_popen_r usage, rename the function

This commit is contained in:
ZyX
2017-03-18 00:16:23 +03:00
parent 0e9286a19e
commit 3cd7bf31e2
3 changed files with 16 additions and 17 deletions

View File

@@ -9,7 +9,7 @@ local nvim_prog = helpers.nvim_prog
local write_file = helpers.write_file
local popen_w = global_helpers.popen_w
local repeated_popen_r = global_helpers.repeated_popen_r
local repeated_read_cmd = global_helpers.repeated_read_cmd
describe('Command-line option', function()
describe('-s', function()
@@ -48,10 +48,9 @@ describe('Command-line option', function()
eq(nil, lfs.attributes(fname))
eq(true, not not dollar_fname:find('%$%w+'))
write_file(dollar_fname, ':call setline(1, "100500")\n:wqall!\n')
local pipe = repeated_popen_r(
local stdout = repeated_read_cmd(
nvim_prog, '-u', 'NONE', '-i', 'NONE', '--headless', '-s', dollar_fname,
fname)
local stdout = pipe:read('*a')
eq('', stdout)
local attrs = lfs.attributes(fname)
eq(#('100500\n'), attrs.size)