comparison src/testdir/test_put.vim @ 21996:808edde1e97d v8.2.1547

patch 8.2.1547: various comment problems Commit: https://github.com/vim/vim/commit/02c037a4be6aeb7f6376e7dcc3ab41cfc6db3ede Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 30 19:26:45 2020 +0200 patch 8.2.1547: various comment problems Problem: Various comment problems. Solution: Update comments.
author Bram Moolenaar <Bram@vim.org>
date Sun, 30 Aug 2020 19:30:13 +0200
parents f70a3c1000bb
children ff21e2962490
comparison
equal deleted inserted replaced
21995:df20e24140b4 21996:808edde1e97d
20 bw! 20 bw!
21 endfunc 21 endfunc
22 22
23 func Test_put_char_block2() 23 func Test_put_char_block2()
24 new 24 new
25 let a = [ 'a'->getreg(), 'a'->getregtype() ]
26 call setreg('a', ' one ', 'v') 25 call setreg('a', ' one ', 'v')
27 call setline(1, ['Line 1', '', 'Line 3', '']) 26 call setline(1, ['Line 1', '', 'Line 3', ''])
28 " visually select the first 3 lines and put register a over it 27 " visually select the first 3 lines and put register a over it
29 exe "norm! ggl\<c-v>2j2l\"ap" 28 exe "norm! ggl\<c-v>2j2l\"ap"
30 call assert_equal(['L one 1', '', 'L one 3', ''], getline(1,4)) 29 call assert_equal(['L one 1', '', 'L one 3', ''], getline(1, 4))
31 " clean up 30 " clean up
32 bw! 31 bw!
33 call setreg('a', a[0], a[1])
34 endfunc 32 endfunc
35 33
36 func Test_put_lines() 34 func Test_put_lines()
37 new 35 new
38 let a = [ getreg('a'), getregtype('a') ] 36 let a = [ getreg('a'), getregtype('a') ]
39 call setline(1, ['Line 1', 'Line2', 'Line 3', '']) 37 call setline(1, ['Line 1', 'Line2', 'Line 3', ''])
40 exe 'norm! gg"add"AddG""p' 38 exe 'norm! gg"add"AddG""p'
41 call assert_equal(['Line 3', '', 'Line 1', 'Line2'], getline(1,'$')) 39 call assert_equal(['Line 3', '', 'Line 1', 'Line2'], getline(1, '$'))
42 " clean up 40 " clean up
43 bw! 41 bw!
44 eval a[0]->setreg('a', a[1]) 42 eval a[0]->setreg('a', a[1])
45 endfunc 43 endfunc
46 44
51 norm! j0. 49 norm! j0.
52 norm! j0. 50 norm! j0.
53 exec "4norm! \"=\<cr>P" 51 exec "4norm! \"=\<cr>P"
54 norm! j0. 52 norm! j0.
55 norm! j0. 53 norm! j0.
56 call assert_equal(['A1','A2','A3','4A','5A','6A'], getline(1,'$')) 54 call assert_equal(['A1','A2','A3','4A','5A','6A'], getline(1, '$'))
57 bw! 55 bw!
58 endfunc 56 endfunc
59 57
60 func Test_put_fails_when_nomodifiable() 58 func Test_put_fails_when_nomodifiable()
61 new 59 new