diff options
author | Utkarsh Maheshwari <utkarshme96@gmail.com> | 2018-12-18 12:50:44 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2018-12-31 12:44:22 +0100 |
commit | ebe16cd9bdd214955469f4db4f1c4a2c11724b1d (patch) | |
tree | c16e24b07200ab5c6a34c7ee8d37e24f0a60b1ea /test/functional/ui/screen.lua | |
parent | 1f8afe15a4670b237a4e97d8038ddd75c7d9d227 (diff) | |
download | rneovim-ebe16cd9bdd214955469f4db4f1c4a2c11724b1d.tar.gz rneovim-ebe16cd9bdd214955469f4db4f1c4a2c11724b1d.tar.bz2 rneovim-ebe16cd9bdd214955469f4db4f1c4a2c11724b1d.zip |
multigrid: add multigrid screen tests
Diffstat (limited to 'test/functional/ui/screen.lua')
-rw-r--r-- | test/functional/ui/screen.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua index dfcb74b03f..218d0490f1 100644 --- a/test/functional/ui/screen.lua +++ b/test/functional/ui/screen.lua @@ -349,7 +349,6 @@ function Screen:expect(expected, attr_ids, attr_ignore) -- value. grid = dedent(grid:gsub('\n[ ]+$', ''), 0) for row in grid:gmatch('[^\n]+') do - row = row:sub(1, #row - 1) -- Last char must be the screen delimiter. table.insert(expected_rows, row) end end @@ -382,7 +381,7 @@ function Screen:expect(expected, attr_ids, attr_ignore) return ( 'Failed to match any screen lines.\n' .. 'Expected (anywhere): "' .. expected.any .. '"\n' - .. 'Actual:\n |' .. table.concat(actual_rows, '|\n |') .. '|\n\n') + .. 'Actual:\n |' .. table.concat(actual_rows, '\n |') .. '\n\n') end end @@ -402,8 +401,8 @@ function Screen:expect(expected, attr_ids, attr_ignore) actual_rows[i] = '*' .. actual_rows[i] return ( 'Row ' .. tostring(i) .. ' did not match.\n' - ..'Expected:\n |'..table.concat(msg_expected_rows, '|\n |')..'|\n' - ..'Actual:\n |'..table.concat(actual_rows, '|\n |')..'|\n\n'..[[ + ..'Expected:\n |'..table.concat(msg_expected_rows, '\n |')..'\n' + ..'Actual:\n |'..table.concat(actual_rows, '\n |')..'\n\n'..[[ To print the expect() call that would assert the current screen state, use screen:snapshot_util(). In case of non-deterministic failures, use screen:redraw_debug() to show all intermediate screen states. ]]) |