Bram Moolenaar | c812996 | 2017-01-22 20:04:51 +0100 | [diff] [blame] | 1 | |
| 2 | func 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! |
| 12 | endfunc |
Bram Moolenaar | 9957a10 | 2017-01-23 21:53:53 +0100 | [diff] [blame^] | 13 | |
| 14 | func 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! |
| 23 | endfunc |