Bram Moolenaar | 8c87a2b | 2018-04-10 13:15:47 +0200 | [diff] [blame] | 1 | " Test for block inserting |
| 2 | " |
| 3 | " TODO: rewrite test39.in into this new style test |
| 4 | |
| 5 | func Test_blockinsert_indent() |
| 6 | new |
| 7 | filetype plugin indent on |
| 8 | setlocal sw=2 et ft=vim |
| 9 | call setline(1, ['let a=[', ' ''eins'',', ' ''zwei'',', ' ''drei'']']) |
| 10 | call cursor(2, 3) |
| 11 | exe "norm! \<c-v>2jI\\ \<esc>" |
| 12 | call assert_equal(['let a=[', ' \ ''eins'',', ' \ ''zwei'',', ' \ ''drei'']'], |
| 13 | \ getline(1,'$')) |
| 14 | " reset to sane state |
| 15 | filetype off |
| 16 | bwipe! |
| 17 | endfunc |
| 18 | |
Bram Moolenaar | 35e802e | 2018-04-30 17:21:03 +0200 | [diff] [blame^] | 19 | func Test_blockinsert_delete() |
| 20 | new |
| 21 | let _bs = &bs |
| 22 | set bs=2 |
| 23 | call setline(1, ['case Arg is ', ' when Name_Async,', ' when Name_Num_Gangs,', 'end if;']) |
| 24 | exe "norm! ggjVj\<c-v>$o$A\<bs>\<esc>" |
| 25 | "call feedkeys("Vj\<c-v>$o$A\<bs>\<esc>", 'ti') |
| 26 | call assert_equal(["case Arg is ", " when Name_Async", " when Name_Num_Gangs,", "end if;"], |
| 27 | \ getline(1,'$')) |
| 28 | " reset to sane state |
| 29 | let &bs = _bs |
| 30 | bwipe! |
| 31 | endfunc |
Bram Moolenaar | 8c87a2b | 2018-04-10 13:15:47 +0200 | [diff] [blame] | 32 | |
| 33 | " vim: shiftwidth=2 sts=2 expandtab |