aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/tui_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-08-20 19:41:45 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-08-27 21:19:10 +0200
commit0221a9220a2ec0691a7139c8362aba80d1f3b8ee (patch)
treed0bcc1d5656776bc5a1974495d7e1a5e1016e382 /test/functional/terminal/tui_spec.lua
parentd303790ee751916a00a45ee91ff1cf3ab82928c8 (diff)
downloadrneovim-0221a9220a2ec0691a7139c8362aba80d1f3b8ee.tar.gz
rneovim-0221a9220a2ec0691a7139c8362aba80d1f3b8ee.tar.bz2
rneovim-0221a9220a2ec0691a7139c8362aba80d1f3b8ee.zip
paste: edge-case: handle EOL at end-of-buffer
This is "readfile()-style", see also ":help channel-lines".
Diffstat (limited to 'test/functional/terminal/tui_spec.lua')
-rw-r--r--test/functional/terminal/tui_spec.lua13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua
index 4a450b2fb4..6b12c1a889 100644
--- a/test/functional/terminal/tui_spec.lua
+++ b/test/functional/terminal/tui_spec.lua
@@ -189,20 +189,20 @@ describe('TUI', function()
it('paste: exactly 64 bytes #10311', function()
-- "bracketed paste"
feed_data('i\027[200~'..string.rep('z', 64)..'\027[201~')
- feed_data('\003') -- CTRL-C
+ feed_data(' end')
screen:expect([[
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz|
- zzzzzzzzzzzzz{1:z} |
+ zzzzzzzzzzzzzz end{1: } |
{4:~ }|
{4:~ }|
{5:[No Name] [+] }|
- |
+ {3:-- INSERT --} |
{3:-- TERMINAL --} |
]])
end)
it('paste: big burst of input', function()
- feed_command('set ruler')
+ feed_data(':set ruler\013')
local t = {}
for i = 1, 3000 do
t[i] = 'item ' .. tostring(i)
@@ -210,12 +210,13 @@ describe('TUI', function()
local expected = table.concat(t, '\n')
-- "bracketed paste"
feed_data('i\027[200~'..expected..'\027[201~')
+ feed_data(' end')
screen:expect([[
item 2997 |
item 2998 |
item 2999 |
- item 3000{1: } |
- {5:[No Name] [+] 3000,10 Bot}|
+ item 3000 end{1: } |
+ {5:[No Name] [+] 3000,14 Bot}|
{3:-- INSERT --} |
{3:-- TERMINAL --} |
]])