comparison src/testdir/test_edit.vim @ 19738:0208534b8a84 v8.2.0425

patch 8.2.0425: code for modeless selection not sufficiently tested Commit: https://github.com/vim/vim/commit/515545e11f523d14343b1e588dc0b9bd3d362bc2 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 22 14:08:59 2020 +0100 patch 8.2.0425: code for modeless selection not sufficiently tested Problem: Code for modeless selection not sufficiently tested. Solution: Add tests. Move mouse code functionality to a common script file. (Yegappan Lakshmanan, closes #5821)
author Bram Moolenaar <Bram@vim.org>
date Sun, 22 Mar 2020 14:15:04 +0100
parents f70a3c1000bb
children 12518b40c161
comparison
equal deleted inserted replaced
19737:5591829276ff 19738:0208534b8a84
252 " 4) CTRL-\ a (should be inserted literally, not special after <c-\> 252 " 4) CTRL-\ a (should be inserted literally, not special after <c-\>
253 call setline(1, ['ABC', 'ZZZ', 'def', 'ghi']) 253 call setline(1, ['ABC', 'ZZZ', 'def', 'ghi'])
254 call cursor(1, 1) 254 call cursor(1, 1)
255 call feedkeys("A\<c-\>a", 'txin') 255 call feedkeys("A\<c-\>a", 'txin')
256 call assert_equal(["ABC\<c-\>a", 'ZZZ', 'def', 'ghi'], getline(1, '$')) 256 call assert_equal(["ABC\<c-\>a", 'ZZZ', 'def', 'ghi'], getline(1, '$'))
257 bw!
258 endfunc
259
260 func Test_edit_10()
261 " Test for starting selectmode
262 new
263 set selectmode=key keymodel=startsel
264 call setline(1, ['abc', 'def', 'ghi'])
265 call cursor(1, 4)
266 call feedkeys("A\<s-home>start\<esc>", 'txin')
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))
272 set selectmode= keymodel=
273 bw! 257 bw!
274 endfunc 258 endfunc
275 259
276 func Test_edit_11() 260 func Test_edit_11()
277 " Test that indenting kicks in 261 " Test that indenting kicks in