paste: fixup tests

This commit is contained in:
Justin M. Keyes
2019-08-19 01:01:40 +02:00
parent 4389401a7c
commit abd55be19a
2 changed files with 7 additions and 12 deletions

View File

@@ -146,8 +146,7 @@ describe('TUI', function()
]], attrs)
end)
it('bracketed Paste', function()
-- Pasting can be really slow in the TUI, specially in ASAN.
it('paste: Insert mode', function()
feed_data('i\027[200~')
screen:expect([[
{1: } |
@@ -160,8 +159,8 @@ describe('TUI', function()
]])
feed_data('pasted from terminal')
screen:expect([[
pasted from terminal{1: } |
|
pasted from terminal{1: } |
{4:~ }|
{4:~ }|
{5:[No Name] [+] }|
@@ -171,8 +170,8 @@ describe('TUI', function()
feed_data('\027[201~') -- End paste.
feed_data('\027\000') -- ESC: go to Normal mode.
screen:expect([[
pasted from termina{1:l} |
|
pasted from termina{1:l} |
{4:~ }|
{4:~ }|
{5:[No Name] [+] }|
@@ -181,24 +180,20 @@ describe('TUI', function()
]])
end)
it('handles pasting a specific amount of text', function()
-- Need extra time for this test, specially in ASAN.
screen.timeout = 60000
it('pasting a specific amount of text #10311', function()
feed_data('i\027[200~'..string.rep('z', 64)..'\027[201~')
screen:expect([[
|
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz|
zzzzzzzzzzzzzz{1: } |
{4:~ }|
{4:~ }|
{5:[No Name] [+] }|
{3:-- INSERT --} |
{3:-- TERMINAL --} |
]])
end)
it('can handle arbitrarily long bursts of input', function()
-- Need extra time for this test, specially in ASAN.
screen.timeout = 60000
it('big burst of input (bracketed paste)', function()
feed_command('set ruler')
local t = {}
for i = 1, 3000 do