diff options
author | James McCoy <jamessan@jamessan.com> | 2019-12-15 21:17:16 -0500 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2019-12-15 21:17:16 -0500 |
commit | 6566251d144d2c9c9e08e05c8c3a3fe9915a19b8 (patch) | |
tree | 980fd0c7287e295c8ac72858b0794f72224415e0 /test/functional/terminal/scrollback_spec.lua | |
parent | 9c4223215f71e1212462ada4e698be1b31437dd9 (diff) | |
parent | 9f3d483c79f03c48239fdc82cc02e8685a03d22a (diff) | |
download | rneovim-6566251d144d2c9c9e08e05c8c3a3fe9915a19b8.tar.gz rneovim-6566251d144d2c9c9e08e05c8c3a3fe9915a19b8.tar.bz2 rneovim-6566251d144d2c9c9e08e05c8c3a3fe9915a19b8.zip |
Merge remote-tracking branch 'upstream/master' into libcall
Diffstat (limited to 'test/functional/terminal/scrollback_spec.lua')
-rw-r--r-- | test/functional/terminal/scrollback_spec.lua | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/test/functional/terminal/scrollback_spec.lua b/test/functional/terminal/scrollback_spec.lua index 7413081510..1df8df6f6e 100644 --- a/test/functional/terminal/scrollback_spec.lua +++ b/test/functional/terminal/scrollback_spec.lua @@ -21,10 +21,6 @@ describe(':terminal scrollback', function() screen = thelpers.screen_setup(nil, nil, 30) end) - after_each(function() - screen:detach() - end) - describe('when the limit is exceeded', function() before_each(function() local lines = {} @@ -406,8 +402,6 @@ describe("'scrollback' option", function() feed_data(nvim_dir..'/shell-test REP 31 line'..(iswin() and '\r' or '\n')) screen:expect{any='30: line '} retry(nil, nil, function() expect_lines(7) end) - - screen:detach() end) it('deletes lines (only) if necessary', function() @@ -438,14 +432,32 @@ describe("'scrollback' option", function() command('sleep 100m') feed_data(nvim_dir.."/shell-test REP 41 line"..(iswin() and '\r' or '\n')) - screen:expect{any='40: line '} + if iswin() then + screen:expect{grid=[[ + 37: line | + 38: line | + 39: line | + 40: line | + | + ${1: } | + {3:-- TERMINAL --} | + ]]} + else + screen:expect{grid=[[ + 36: line | + 37: line | + 38: line | + 39: line | + 40: line | + {MATCH:.*}| + {3:-- TERMINAL --} | + ]]} + end + expect_lines(58) - retry(nil, nil, function() expect_lines(58) end) -- Verify off-screen state eq((iswin() and '36: line' or '35: line'), eval("getline(line('w0') - 1)")) eq((iswin() and '27: line' or '26: line'), eval("getline(line('w0') - 10)")) - - screen:detach() end) it('defaults to 10000 in :terminal buffers', function() |