diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 22:40:31 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 22:40:31 +0000 |
commit | 339e2d15cc26fe86988ea06468d912a46c8d6f29 (patch) | |
tree | a6167fc8fcfc6ae2dc102f57b2473858eac34063 /test/functional/legacy/put_spec.lua | |
parent | 067dc73729267c0262438a6fdd66e586f8496946 (diff) | |
parent | 4a8bf24ac690004aedf5540fa440e788459e5e34 (diff) | |
download | rneovim-339e2d15cc26fe86988ea06468d912a46c8d6f29.tar.gz rneovim-339e2d15cc26fe86988ea06468d912a46c8d6f29.tar.bz2 rneovim-339e2d15cc26fe86988ea06468d912a46c8d6f29.zip |
Merge remote-tracking branch 'upstream/master' into fix_repeatcmdline
Diffstat (limited to 'test/functional/legacy/put_spec.lua')
-rw-r--r-- | test/functional/legacy/put_spec.lua | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/test/functional/legacy/put_spec.lua b/test/functional/legacy/put_spec.lua index 3ddf65490e..4a42a1c8a3 100644 --- a/test/functional/legacy/put_spec.lua +++ b/test/functional/legacy/put_spec.lua @@ -1,4 +1,5 @@ local helpers = require('test.functional.helpers')(after_each) +local Screen = require('test.functional.ui.screen') local clear = helpers.clear local exec_lua = helpers.exec_lua local meths = helpers.meths @@ -42,4 +43,56 @@ describe('put', function() bwipe! ]] end) + + -- oldtest: Test_put_other_window() + it('above topline in buffer in two splits', function() + local screen = Screen.new(80, 10) + screen:attach() + source([[ + 40vsplit + 0put ='some text at the top' + put =' one more text' + put =' two more text' + put =' three more text' + put =' four more text' + ]]) + + screen:expect([[ + some text at the top │some text at the top | + one more text │ one more text | + two more text │ two more text | + three more text │ three more text | + ^four more text │ four more text | + │ | + ~ │~ | + ~ │~ | + [No Name] [+] [No Name] [+] | + | + ]]) + end) + + -- oldtest: Test_put_in_last_displayed_line() + it('in last displayed line', function() + local screen = Screen.new(75, 10) + screen:attach() + source([[ + autocmd CursorMoved * eval line('w$') + let @a = 'x'->repeat(&columns * 2 - 2) + eval range(&lines)->setline(1) + call feedkeys('G"ap') + ]]) + + screen:expect([[ + 2 | + 3 | + 4 | + 5 | + 6 | + 7 | + 8 | + 9xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx| + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx^x | + | + ]]) + end) end) |