mirror of
https://github.com/vim/vim.git
synced 2025-10-04 05:25:06 -04:00
patch 8.2.1786: various Normal mode commands not fully tested
Problem: Various Normal mode commands not fully tested. Solution: Add more tests. (Yegappan Lakshmanan, closes #7059)
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user