aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/input_spec.lua
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2015-10-01 15:37:20 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2015-10-01 15:37:20 -0300
commit536c0ba27e79929eb30850d8e11f2ed026930ab3 (patch)
tree40873cf933b5ba5cff44d1ea07db2b3f2663020e /test/functional/ui/input_spec.lua
parentafe8a32be01d006d6c25f69b4aa1b6e92464ab63 (diff)
parent5d185c77726dfff20b87d97897d2bb237e95d95a (diff)
downloadrneovim-536c0ba27e79929eb30850d8e11f2ed026930ab3.tar.gz
rneovim-536c0ba27e79929eb30850d8e11f2ed026930ab3.tar.bz2
rneovim-536c0ba27e79929eb30850d8e11f2ed026930ab3.zip
Merge PR #3360 'More fixes for 0.1'
Diffstat (limited to 'test/functional/ui/input_spec.lua')
-rw-r--r--test/functional/ui/input_spec.lua70
1 files changed, 70 insertions, 0 deletions
diff --git a/test/functional/ui/input_spec.lua b/test/functional/ui/input_spec.lua
index 81af908045..a7c8e02def 100644
--- a/test/functional/ui/input_spec.lua
+++ b/test/functional/ui/input_spec.lua
@@ -2,6 +2,7 @@ local helpers = require('test.functional.helpers')
local clear, execute, nvim = helpers.clear, helpers.execute, helpers.nvim
local feed, next_message, eq = helpers.feed, helpers.next_message, helpers.eq
local expect = helpers.expect
+local Screen = require('test.functional.ui.screen')
describe('mappings', function()
local cid
@@ -40,7 +41,76 @@ describe('mappings', function()
end)
end)
+describe('feeding large chunks of input with <Paste>', function()
+ local screen
+ before_each(function()
+ clear()
+ screen = Screen.new()
+ screen:attach()
+ execute('set ruler')
+ end)
+
+ it('ok', function()
+ local t = {}
+ for i = 1, 20000 do
+ t[i] = 'item ' .. tostring(i)
+ end
+ feed('i<Paste>')
+ screen:expect([[
+ ^ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ -- INSERT (paste) -- |
+ ]])
+ feed(table.concat(t, '<Enter>'))
+ screen:expect([[
+ item 19988 |
+ item 19989 |
+ item 19990 |
+ item 19991 |
+ item 19992 |
+ item 19993 |
+ item 19994 |
+ item 19995 |
+ item 19996 |
+ item 19997 |
+ item 19998 |
+ item 19999 |
+ item 20000^ |
+ -- INSERT (paste) -- |
+ ]])
+ feed('<Paste>')
+ screen:expect([[
+ item 19988 |
+ item 19989 |
+ item 19990 |
+ item 19991 |
+ item 19992 |
+ item 19993 |
+ item 19994 |
+ item 19995 |
+ item 19996 |
+ item 19997 |
+ item 19998 |
+ item 19999 |
+ item 20000^ |
+ -- INSERT -- 20000,11 Bot |
+ ]])
+ end)
+end)
+
describe('input utf sequences that contain CSI/K_SPECIAL', function()
+ before_each(clear)
it('ok', function()
feed('i…<esc>')
expect('…')