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