diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-10-02 18:48:07 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-10-02 18:48:07 +0200 |
commit | 8a9bc95eaec53f4e0c951ff8f2686ae5113a5709 (patch) | |
tree | e4c87fcdb5bdeeccd51d7f7112a96199c4b5136f /src/testdir/test_visual.vim | |
parent | 3f974ff45e0ea4b85fea7d8768f005d8a2c7941e (diff) |
patch 8.2.1786: various Normal mode commands not fully testedv8.2.1786
Problem: Various Normal mode commands not fully tested.
Solution: Add more tests. (Yegappan Lakshmanan, closes #7059)
Diffstat (limited to 'src/testdir/test_visual.vim')
-rw-r--r-- | src/testdir/test_visual.vim | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/src/testdir/test_visual.vim b/src/testdir/test_visual.vim index 3243eb03cf..c19782c6f2 100644 --- a/src/testdir/test_visual.vim +++ b/src/testdir/test_visual.vim @@ -370,14 +370,17 @@ endfunc func Test_Visual_paragraph_textobject() new - call setline(1, ['First line.', - \ '', - \ 'Second line.', - \ 'Third line.', - \ 'Fourth line.', - \ 'Fifth line.', - \ '', - \ 'Sixth line.']) + let lines =<< trim [END] + First line. + + Second line. + Third line. + Fourth line. + Fifth line. + + Sixth line. + [END] + call setline(1, lines) " When start and end of visual area are identical, 'ap' or 'ip' select " the whole paragraph. @@ -633,6 +636,20 @@ func Test_characterwise_visual_mode() normal Gkvj$d call assert_equal(['', 'a', ''], getline(1, '$')) + " characterwise visual mode: use a count with the visual mode + %d _ + call setline(1, 'one two three') + norm! vy5vy + call assert_equal('one t', @") + + " characterwise visual mode: use a count with the visual mode from the last + " line in the buffer + %d _ + call setline(1, ['one', 'two', 'three', 'four']) + norm! vj$y + norm! G1vy + call assert_equal('four', @") + bwipe! endfunc |