functests: Fix screen.lua supplying dedent additional argument

This commit is contained in:
ZyX
2017-06-20 20:52:43 +03:00
parent ae457ff64a
commit 476c28f433

View File

@@ -198,8 +198,9 @@ function Screen:expect(expected, attr_ids, attr_ignore, condition, any)
condition = expected
expected = nil
else
-- Remove the last line and dedent.
expected = dedent(expected:gsub('\n[ ]+$', ''))
-- Remove the last line and dedent. Note that gsub returns more then one
-- value.
expected = dedent(expected:gsub('\n[ ]+$', ''), 0)
for row in expected:gmatch('[^\n]+') do
row = row:sub(1, #row - 1) -- Last char must be the screen delimiter.
table.insert(expected_rows, row)