Mercurial > vim
comparison src/testdir/test_virtualedit.vim @ 20941:505d97ea54da v8.2.1022
patch 8.2.1022: various parts of code not covered by tests
Commit: https://github.com/vim/vim/commit/845e0ee59430eac07e74b6cb92020e420d17953d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jun 20 16:05:32 2020 +0200
patch 8.2.1022: various parts of code not covered by tests
Problem: Various parts of code not covered by tests.
Solution: Add more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/6300)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 20 Jun 2020 16:15:04 +0200 |
parents | b07672d13ff9 |
children | 3cdbce5ba73f |
comparison
equal
deleted
inserted
replaced
20940:88ce5327f213 | 20941:505d97ea54da |
---|---|
355 call assert_equal(' two', getline(1)) | 355 call assert_equal(' two', getline(1)) |
356 set virtualedit& | 356 set virtualedit& |
357 close! | 357 close! |
358 endfunc | 358 endfunc |
359 | 359 |
360 " Test for using <BS>, <C-W> and <C-U> in virtual edit mode | |
361 " to erase character, word and line. | |
362 func Test_ve_backspace() | |
363 new | |
364 call setline(1, 'sample') | |
365 set virtualedit=all | |
366 set backspace=indent,eol,start | |
367 exe "normal 15|i\<BS>\<BS>" | |
368 call assert_equal([0, 1, 7, 5], getpos('.')) | |
369 exe "normal 15|i\<C-W>" | |
370 call assert_equal([0, 1, 6, 0], getpos('.')) | |
371 exe "normal 15|i\<C-U>" | |
372 call assert_equal([0, 1, 1, 0], getpos('.')) | |
373 set backspace& | |
374 set virtualedit& | |
375 close! | |
376 endfunc | |
377 | |
360 " vim: shiftwidth=2 sts=2 expandtab | 378 " vim: shiftwidth=2 sts=2 expandtab |