summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_edit.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-03-08 05:13:15 +0100
committerBram Moolenaar <Bram@vim.org>2020-03-08 05:13:15 +0100
commitf5f1e10d0d39890298cdf27f664d466c8872b87e (patch)
tree5485b5ec47d1236a14e2db3dc0fecc87d6e7ce5d /src/testdir/test_edit.vim
parentd0d440f702d1c6fef36386f8b91d074d0f3e4718 (diff)
patch 8.2.0363: some Normal mode commands not testedv8.2.0363
Problem: Some Normal mode commands not tested. Solution: Add more tests. (Yegappan Lakshmanan, closes #5746)
Diffstat (limited to 'src/testdir/test_edit.vim')
-rw-r--r--src/testdir/test_edit.vim14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/testdir/test_edit.vim b/src/testdir/test_edit.vim
index eef22d49c2..9d2d0f34ac 100644
--- a/src/testdir/test_edit.vim
+++ b/src/testdir/test_edit.vim
@@ -265,6 +265,10 @@ func Test_edit_10()
call cursor(1, 4)
call feedkeys("A\<s-home>start\<esc>", 'txin')
call assert_equal(['startdef', 'ghi'], getline(1, '$'))
+ " start select mode again with gv
+ set selectmode=cmd
+ call feedkeys('gvabc', 'xt')
+ call assert_equal('abctdef', getline(1))
set selectmode= keymodel=
bw!
endfunc
@@ -1263,6 +1267,16 @@ func Test_edit_forbidden()
catch /^Vim\%((\a\+)\)\=:E117/ " catch E117: unknown function
endtry
au! InsertCharPre
+ " Not allowed to enter ex mode when text is locked
+ au InsertCharPre <buffer> :normal! gQ<CR>
+ let caught_e523 = 0
+ try
+ call feedkeys("ix\<esc>", 'xt')
+ catch /^Vim\%((\a\+)\)\=:E523/ " catch E523
+ let caught_e523 = 1
+ endtry
+ call assert_equal(1, caught_e523)
+ au! InsertCharPre
" 3) edit when completion is shown
fun! Complete(findstart, base)
if a:findstart