aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_normal.vim
diff options
context:
space:
mode:
Diffstat (limited to 'test/old/testdir/test_normal.vim')
-rw-r--r--test/old/testdir/test_normal.vim23
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