diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-05-08 01:34:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-08 01:34:38 +0800 |
commit | 13e7e4e67ada0cd359977ca1f56ef9d8ce8c938c (patch) | |
tree | 5d9f239d6421d94f2327df672500332ec72b099f /test/old/testdir/test_normal.vim | |
parent | 1cbfed03c249e7f9e67d59566fbabe46f7f7f1f9 (diff) | |
parent | 5844af0d524956b55100e4350934237e4a12a147 (diff) | |
download | rneovim-13e7e4e67ada0cd359977ca1f56ef9d8ce8c938c.tar.gz rneovim-13e7e4e67ada0cd359977ca1f56ef9d8ce8c938c.tar.bz2 rneovim-13e7e4e67ada0cd359977ca1f56ef9d8ce8c938c.zip |
Merge pull request #23527 from zeertzjq/vim-8.2.1978
vim-patch:8.2.{1978,2062,3887},9.0.{1516,1521}
Diffstat (limited to 'test/old/testdir/test_normal.vim')
-rw-r--r-- | test/old/testdir/test_normal.vim | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/test/old/testdir/test_normal.vim b/test/old/testdir/test_normal.vim index 330a16dffb..a854c9538f 100644 --- a/test/old/testdir/test_normal.vim +++ b/test/old/testdir/test_normal.vim @@ -3648,11 +3648,32 @@ func Test_horiz_motion() bwipe! endfunc -" Test for using a : command in operator pending mode +" Test for using a ":" command in operator pending mode func Test_normal_colon_op() new call setline(1, ['one', 'two']) call assert_beeps("normal! Gc:d\<CR>") + call assert_equal(['one'], getline(1, '$')) + + call setline(1, ['one…two…three!']) + normal! $ + " Using ":" as a movement is characterwise exclusive + call feedkeys("d:normal! F…\<CR>", 'xt') + call assert_equal(['one…two!'], getline(1, '$')) + " Check that redoing a command with 0x80 bytes works + call feedkeys('.', 'xt') + call assert_equal(['one!'], getline(1, '$')) + + call setline(1, ['one', 'two', 'three', 'four', 'five']) + " Add this to the command history + call feedkeys(":normal! G0\<CR>", 'xt') + " Use :normal! with control characters in operator pending mode + call feedkeys("d:normal! \<C-V>\<C-P>\<C-V>\<C-P>\<CR>", 'xt') + call assert_equal(['one', 'two', 'five'], getline(1, '$')) + " Check that redoing a command with control characters works + call feedkeys('.', 'xt') + call assert_equal(['five'], getline(1, '$')) + bwipe! endfunc |