From 476c28f433ebd7e3c8dfc2d31c59b3fc4c1c02e5 Mon Sep 17 00:00:00 2001 From: ZyX Date: Tue, 20 Jun 2017 20:52:43 +0300 Subject: functests: Fix screen.lua supplying dedent additional argument --- test/functional/ui/screen.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/functional/ui/screen.lua') diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua index 7d9cd6c026..5408e1e195 100644 --- a/test/functional/ui/screen.lua +++ b/test/functional/ui/screen.lua @@ -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) -- cgit