blob: 0154de1ec05f1988825e59952e61fd8fee4ff893 [file] [log] [blame]
Bram Moolenaarc8129962017-01-22 20:04:51 +01001
2func Test_put_block()
3 if !has('multi_byte')
4 return
5 endif
6 new
7 call feedkeys("i\<C-V>u2500\<CR>x\<ESC>", 'x')
8 call feedkeys("\<C-V>y", 'x')
9 call feedkeys("gg0p", 'x')
10 call assert_equal("\u2500x", getline(1))
11 bwipe!
12endfunc
Bram Moolenaar9957a102017-01-23 21:53:53 +010013
14func Test_put_char_block()
15 new
16 call setline(1, ['Line 1', 'Line 2'])
17 f Xfile_put
18 " visually select both lines and put the cursor at the top of the visual
19 " selection and then put the buffer name over it
20 exe "norm! G0\<c-v>ke\"%p"
21 call assert_equal(['Xfile_put 1', 'Xfile_put 2'], getline(1,2))
22 bw!
23endfunc