Mercurial > vim
comparison src/testdir/test_edit.vim @ 19613:9c15be376631 v8.2.0363
patch 8.2.0363: some Normal mode commands not tested
Commit: https://github.com/vim/vim/commit/f5f1e10d0d39890298cdf27f664d466c8872b87e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 8 05:13:15 2020 +0100
patch 8.2.0363: some Normal mode commands not tested
Problem: Some Normal mode commands not tested.
Solution: Add more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5746)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 08 Mar 2020 05:15:04 +0100 |
parents | 67fbe280a502 |
children | f70a3c1000bb |
comparison
equal
deleted
inserted
replaced
19612:a70ee453358e | 19613:9c15be376631 |
---|---|
263 set selectmode=key keymodel=startsel | 263 set selectmode=key keymodel=startsel |
264 call setline(1, ['abc', 'def', 'ghi']) | 264 call setline(1, ['abc', 'def', 'ghi']) |
265 call cursor(1, 4) | 265 call cursor(1, 4) |
266 call feedkeys("A\<s-home>start\<esc>", 'txin') | 266 call feedkeys("A\<s-home>start\<esc>", 'txin') |
267 call assert_equal(['startdef', 'ghi'], getline(1, '$')) | 267 call assert_equal(['startdef', 'ghi'], getline(1, '$')) |
268 " start select mode again with gv | |
269 set selectmode=cmd | |
270 call feedkeys('gvabc', 'xt') | |
271 call assert_equal('abctdef', getline(1)) | |
268 set selectmode= keymodel= | 272 set selectmode= keymodel= |
269 bw! | 273 bw! |
270 endfunc | 274 endfunc |
271 | 275 |
272 func Test_edit_11() | 276 func Test_edit_11() |
1260 try | 1264 try |
1261 call feedkeys("ix\<esc>", 'tnix') | 1265 call feedkeys("ix\<esc>", 'tnix') |
1262 call assert_fails(1, 'unknown function') | 1266 call assert_fails(1, 'unknown function') |
1263 catch /^Vim\%((\a\+)\)\=:E117/ " catch E117: unknown function | 1267 catch /^Vim\%((\a\+)\)\=:E117/ " catch E117: unknown function |
1264 endtry | 1268 endtry |
1269 au! InsertCharPre | |
1270 " Not allowed to enter ex mode when text is locked | |
1271 au InsertCharPre <buffer> :normal! gQ<CR> | |
1272 let caught_e523 = 0 | |
1273 try | |
1274 call feedkeys("ix\<esc>", 'xt') | |
1275 catch /^Vim\%((\a\+)\)\=:E523/ " catch E523 | |
1276 let caught_e523 = 1 | |
1277 endtry | |
1278 call assert_equal(1, caught_e523) | |
1265 au! InsertCharPre | 1279 au! InsertCharPre |
1266 " 3) edit when completion is shown | 1280 " 3) edit when completion is shown |
1267 fun! Complete(findstart, base) | 1281 fun! Complete(findstart, base) |
1268 if a:findstart | 1282 if a:findstart |
1269 return col('.') | 1283 return col('.') |