aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_functions.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-08-23 06:42:10 +0800
committerGitHub <noreply@github.com>2023-08-23 06:42:10 +0800
commit6462ee1c10f9f1aa66ffc4d4fe1b7b3d9f0f91af (patch)
tree3d65da7025785f89e0c7743147d223233f3ca750 /test/old/testdir/test_functions.vim
parent20f76ebf2b5aec799b0f90e5e892a4b88597d427 (diff)
downloadrneovim-6462ee1c10f9f1aa66ffc4d4fe1b7b3d9f0f91af.tar.gz
rneovim-6462ee1c10f9f1aa66ffc4d4fe1b7b3d9f0f91af.tar.bz2
rneovim-6462ee1c10f9f1aa66ffc4d4fe1b7b3d9f0f91af.zip
vim-patch:9.0.1779: Need more state() tests (#24840)
Problem: Need more state() tests Solution: Add a few more tests for operater pending mode and register yank command closes: vim/vim#12883 https://github.com/vim/vim/commit/8dabccd295271104ad5af0abc48e283d644cff59
Diffstat (limited to 'test/old/testdir/test_functions.vim')
-rw-r--r--test/old/testdir/test_functions.vim14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/old/testdir/test_functions.vim b/test/old/testdir/test_functions.vim
index ca0066efca..37541c4af3 100644
--- a/test/old/testdir/test_functions.vim
+++ b/test/old/testdir/test_functions.vim
@@ -2630,6 +2630,20 @@ func Test_state()
call term_sendkeys(buf, getstate)
call WaitForAssert({-> assert_match('state: mSc; mode: n', term_getline(buf, 6))}, 1000)
+ " A operator is pending
+ call term_sendkeys(buf, ":call RunTimer()\<CR>y")
+ call TermWait(buf, 25)
+ call term_sendkeys(buf, "y")
+ call term_sendkeys(buf, getstate)
+ call WaitForAssert({-> assert_match('state: oSc; mode: n', term_getline(buf, 6))}, 1000)
+
+ " A register was specified
+ call term_sendkeys(buf, ":call RunTimer()\<CR>\"r")
+ call TermWait(buf, 25)
+ call term_sendkeys(buf, "yy")
+ call term_sendkeys(buf, getstate)
+ call WaitForAssert({-> assert_match('state: oSc; mode: n', term_getline(buf, 6))}, 1000)
+
" Insert mode completion (bit slower on Mac)
call term_sendkeys(buf, ":call RunTimer()\<CR>Got\<C-N>")
call TermWait(buf, 25)