diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2018-07-12 12:21:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-12 12:21:11 +0200 |
commit | 56065bbdc6d20feb431fe55d8165f78fb50eb8b7 (patch) | |
tree | 33f32334461062dec5bd5624bbadbec828e2c782 /test/functional/ui/screen.lua | |
parent | 798f05876c114436851d98232739b4ba28318d79 (diff) | |
parent | e51bffefa523e0cde75eedc84b3e1cb02951d391 (diff) | |
download | rneovim-56065bbdc6d20feb431fe55d8165f78fb50eb8b7.tar.gz rneovim-56065bbdc6d20feb431fe55d8165f78fb50eb8b7.tar.bz2 rneovim-56065bbdc6d20feb431fe55d8165f78fb50eb8b7.zip |
Merge pull request #8721 from bfredl/quickresize
Fix redrawing issues with narrow screen and remove extra wait in resize tests
Diffstat (limited to 'test/functional/ui/screen.lua')
-rw-r--r-- | test/functional/ui/screen.lua | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua index 52e108f389..7607131e9b 100644 --- a/test/functional/ui/screen.lua +++ b/test/functional/ui/screen.lua @@ -172,9 +172,6 @@ end function Screen:try_resize(columns, rows) uimeths.try_resize(columns, rows) - -- Give ourselves a chance to _handle_resize, which requires using - -- self.sleep() (for the resize notification) rather than run() - self:sleep(0.1) end function Screen:set_option(option, value) @@ -210,11 +207,6 @@ function Screen:expect(expected, attr_ids, attr_ignore, condition, any) row = row:sub(1, #row - 1) -- Last char must be the screen delimiter. table.insert(expected_rows, row) end - if not any then - assert(self._height == #expected_rows, - "Expected screen state's row count(" .. #expected_rows - .. ') differs from configured height(' .. self._height .. ') of Screen.') - end end local ids = attr_ids or self._default_attr_ids local ignore = attr_ignore or self._default_attr_ignore @@ -225,6 +217,12 @@ function Screen:expect(expected, attr_ids, attr_ignore, condition, any) return tostring(res) end end + + if expected and not any and self._height ~= #expected_rows then + return ("Expected screen state's row count(" .. #expected_rows + .. ') differs from configured height(' .. self._height .. ') of Screen.') + end + local actual_rows = {} for i = 1, self._height do actual_rows[i] = self:_row_repr(self._rows[i], ids, ignore) |