blob: de56f23cbbc5e094507e8107712b0ce4980a2a35 [file] [log] [blame]
Bram Moolenaar8c87a2b2018-04-10 13:15:47 +02001" Test for block inserting
Bram Moolenaar8c87a2b2018-04-10 13:15:47 +02002
3func Test_blockinsert_indent()
4 new
5 filetype plugin indent on
6 setlocal sw=2 et ft=vim
7 call setline(1, ['let a=[', ' ''eins'',', ' ''zwei'',', ' ''drei'']'])
8 call cursor(2, 3)
9 exe "norm! \<c-v>2jI\\ \<esc>"
10 call assert_equal(['let a=[', ' \ ''eins'',', ' \ ''zwei'',', ' \ ''drei'']'],
11 \ getline(1,'$'))
12 " reset to sane state
13 filetype off
14 bwipe!
15endfunc
16
Bram Moolenaar35e802e2018-04-30 17:21:03 +020017func Test_blockinsert_delete()
18 new
19 let _bs = &bs
20 set bs=2
21 call setline(1, ['case Arg is ', ' when Name_Async,', ' when Name_Num_Gangs,', 'end if;'])
22 exe "norm! ggjVj\<c-v>$o$A\<bs>\<esc>"
23 "call feedkeys("Vj\<c-v>$o$A\<bs>\<esc>", 'ti')
24 call assert_equal(["case Arg is ", " when Name_Async", " when Name_Num_Gangs,", "end if;"],
25 \ getline(1,'$'))
26 " reset to sane state
27 let &bs = _bs
28 bwipe!
29endfunc
Bram Moolenaar8c87a2b2018-04-10 13:15:47 +020030
31" vim: shiftwidth=2 sts=2 expandtab