diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2023-11-29 06:51:00 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-29 06:51:00 +0800 |
| commit | aa9d9cafd0da58745178fa5a9b0773dcce96f30e (patch) | |
| tree | eae67412a2c263beba40b70d7a17b48267bacf58 /test/old/testdir/test_autocmd.vim | |
| parent | b7831c7f996b769544d2bdc536ef601eb46b4918 (diff) | |
| download | rneovim-aa9d9cafd0da58745178fa5a9b0773dcce96f30e.tar.gz rneovim-aa9d9cafd0da58745178fa5a9b0773dcce96f30e.tar.bz2 rneovim-aa9d9cafd0da58745178fa5a9b0773dcce96f30e.zip | |
vim-patch:9.0.2135: No test for mode() when executing Ex commands (#26282)
Problem: No test for mode() when executing Ex commands
Solution: Add some test cases and simplify several other test cases.
Also add a few more test cases for ModeChanged.
closes: vim/vim#13588
https://github.com/vim/vim/commit/fcaeb3d42b228e73c669b2fce78f1d3fe112769f
Diffstat (limited to 'test/old/testdir/test_autocmd.vim')
| -rw-r--r-- | test/old/testdir/test_autocmd.vim | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/old/testdir/test_autocmd.vim b/test/old/testdir/test_autocmd.vim index c2f7dbd28d..7926411dcd 100644 --- a/test/old/testdir/test_autocmd.vim +++ b/test/old/testdir/test_autocmd.vim @@ -3656,8 +3656,6 @@ func Test_mode_changes() call assert_equal(len(g:mode_seq) - 1, g:index) call assert_equal(2, g:n_to_c) call assert_equal(2, g:c_to_n) - unlet g:n_to_c - unlet g:c_to_n let g:n_to_v = 0 au ModeChanged n:v let g:n_to_v += 1 @@ -3668,8 +3666,10 @@ func Test_mode_changes() call assert_equal(len(g:mode_seq) - 1, g:index) call assert_equal(1, g:n_to_v) call assert_equal(1, g:v_to_n) - unlet g:n_to_v - unlet g:v_to_n + + let g:mode_seq += ['c', 'cr', 'c', 'cr', 'n'] + call feedkeys(":\<Insert>\<Insert>\<Insert>\<CR>", 'tnix') + call assert_equal(len(g:mode_seq) - 1, g:index) au! ModeChanged delfunc TestMode @@ -3684,6 +3684,10 @@ func Test_mode_changes() unlet! g:i_to_n unlet! g:nori_to_any unlet! g:i_to_any + unlet! g:n_to_c + unlet! g:c_to_n + unlet! g:n_to_v + unlet! g:v_to_n endfunc func Test_recursive_ModeChanged() |