aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-06-07 00:19:57 +0800
committerGitHub <noreply@github.com>2022-06-07 00:19:57 +0800
commitab1f96e1d5ba6d6664eb472c2eaade4f91982734 (patch)
tree89f088440b4610364b76bc2a2b65158606d2e01a /test/functional
parent41a49dd9c8e4362c24a3699ec2be746af4623449 (diff)
downloadrneovim-ab1f96e1d5ba6d6664eb472c2eaade4f91982734.tar.gz
rneovim-ab1f96e1d5ba6d6664eb472c2eaade4f91982734.tar.bz2
rneovim-ab1f96e1d5ba6d6664eb472c2eaade4f91982734.zip
vim-patch:8.2.5064: no test for what 8.1.0052 fixes (#18881)
Problem: No test for what 8.1.0052 fixes. Solution: Add a test. (closes vim/vim#10531) https://github.com/vim/vim/commit/3760bfddc414e4d3e1c4203db8c22e293cf08d09
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/legacy/mapping_spec.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/functional/legacy/mapping_spec.lua b/test/functional/legacy/mapping_spec.lua
index 552c26e7f2..456acc12b5 100644
--- a/test/functional/legacy/mapping_spec.lua
+++ b/test/functional/legacy/mapping_spec.lua
@@ -162,4 +162,21 @@ describe('mapping', function()
sleep(10)
eq('n', eval('mode()'))
end)
+
+ it('timeout works after an <Nop> mapping is triggered on timeout vim-patch:8.1.0052', function()
+ command('set timeout timeoutlen=400')
+ command('inoremap ab TEST')
+ command('inoremap a <Nop>')
+ -- Enter Insert mode
+ feed('i')
+ -- Wait for the "a" mapping to time out
+ feed('a')
+ sleep(500)
+ -- Send "a" and wait for a period shorter than 'timeoutlen'
+ feed('a')
+ sleep(100)
+ -- Send "b", should trigger the "ab" mapping
+ feed('b')
+ expect('TEST')
+ end)
end)