diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-08-06 14:26:17 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-08-16 09:13:44 +0200 |
commit | 6a90f53862d9f75f7aeea350944c466aa85f11a2 (patch) | |
tree | d0bfb9c9bbe5fbd97776b87510b693ea4fabc435 /test/functional/terminal/scrollback_spec.lua | |
parent | 8642f05fd91d7285a7d8d2bb13b4d63fe5c371fa (diff) | |
download | rneovim-6a90f53862d9f75f7aeea350944c466aa85f11a2.tar.gz rneovim-6a90f53862d9f75f7aeea350944c466aa85f11a2.tar.bz2 rneovim-6a90f53862d9f75f7aeea350944c466aa85f11a2.zip |
test: cleanup
Diffstat (limited to 'test/functional/terminal/scrollback_spec.lua')
-rw-r--r-- | test/functional/terminal/scrollback_spec.lua | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/test/functional/terminal/scrollback_spec.lua b/test/functional/terminal/scrollback_spec.lua index f39335bfd0..b6b0228513 100644 --- a/test/functional/terminal/scrollback_spec.lua +++ b/test/functional/terminal/scrollback_spec.lua @@ -141,7 +141,8 @@ describe('terminal scrollback', function() describe('and the height is decreased by 1', function() local function will_hide_top_line() screen:try_resize(screen._width, screen._height - 1) - screen:expect_after_resize([[ + retry(nil, 100000, function() + screen:expect([[ line2 | line3 | line4 | @@ -149,6 +150,7 @@ describe('terminal scrollback', function() {1: } | {3:-- TERMINAL --} | ]]) + end) end it('will hide top line', will_hide_top_line) @@ -160,7 +162,8 @@ describe('terminal scrollback', function() end) it('will hide the top 3 lines', function() - screen:expect_after_resize([[ + retry(nil, 100000, function() + screen:expect([[ rows: 5, cols: 30 | rows: 3, cols: 30 | {1: } | @@ -174,19 +177,21 @@ describe('terminal scrollback', function() rows: 3, cols: 30 | | ]]) + end) end) end) end) end) describe('with empty lines after the cursor', function() + if helpers.pending_win32(pending) then return end + describe('and the height is decreased by 2', function() before_each(function() screen:try_resize(screen._width, screen._height - 2) end) local function will_delete_last_two_lines() - if helpers.pending_win32(pending) then return end screen:expect([[ tty ready | rows: 4, cols: 30 | @@ -200,7 +205,6 @@ describe('terminal scrollback', function() it('will delete the last two empty lines', will_delete_last_two_lines) describe('and then decreased by 1', function() - if helpers.pending_win32(pending) then return end before_each(function() will_delete_last_two_lines() screen:try_resize(screen._width, screen._height - 1) @@ -246,19 +250,21 @@ describe('terminal scrollback', function() {3:-- TERMINAL --} | ]]) screen:try_resize(screen._width, screen._height - 3) - screen:expect_after_resize([[ + retry(nil, 100000, function() + screen:expect([[ line4 | rows: 3, cols: 30 | {1: } | {3:-- TERMINAL --} | ]]) eq(7, curbuf('line_count')) + end) end) describe('and the height is increased by 1', function() local function pop_then_push() screen:try_resize(screen._width, screen._height + 1) - screen:expect_after_resize([[ + screen:expect([[ line4 | rows: 3, cols: 30 | rows: 4, cols: 30 | @@ -277,7 +283,7 @@ describe('terminal scrollback', function() end) local function pop3_then_push1() - screen:expect_after_resize([[ + screen:expect([[ line2 | line3 | line4 | |