annotate src/testdir/test_blockedit.vim @ 21765:08940efa6b4e v8.2.1432

patch 8.2.1432: various inconsistencies in test files Commit: https://github.com/vim/vim/commit/6d91bcb4d23b5c6a0be72c384beaf385e2d9d606 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 12 18:50:36 2020 +0200 patch 8.2.1432: various inconsistencies in test files Problem: Various inconsistencies in test files. Solution: Add modelines where they were missing. Use Check commands instead of silently skipping over tests. Adjust indents and comments. (Ken Takata, closes #6695)
author Bram Moolenaar <Bram@vim.org>
date Wed, 12 Aug 2020 19:00:08 +0200
parents 70f1e352d599
children bd46322bea66
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13620
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Test for block inserting
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 func Test_blockinsert_indent()
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4 new
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 filetype plugin indent on
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 setlocal sw=2 et ft=vim
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 call setline(1, ['let a=[', ' ''eins'',', ' ''zwei'',', ' ''drei'']'])
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 call cursor(2, 3)
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 exe "norm! \<c-v>2jI\\ \<esc>"
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 call assert_equal(['let a=[', ' \ ''eins'',', ' \ ''zwei'',', ' \ ''drei'']'],
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 \ getline(1,'$'))
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 " reset to sane state
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 filetype off
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 bwipe!
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 endfunc
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16
13814
7ed76dcf0d94 patch 8.0.1779: deleting in a block selection causes problems
Christian Brabandt <cb@256bit.org>
parents: 13620
diff changeset
17 func Test_blockinsert_delete()
7ed76dcf0d94 patch 8.0.1779: deleting in a block selection causes problems
Christian Brabandt <cb@256bit.org>
parents: 13620
diff changeset
18 new
7ed76dcf0d94 patch 8.0.1779: deleting in a block selection causes problems
Christian Brabandt <cb@256bit.org>
parents: 13620
diff changeset
19 let _bs = &bs
7ed76dcf0d94 patch 8.0.1779: deleting in a block selection causes problems
Christian Brabandt <cb@256bit.org>
parents: 13620
diff changeset
20 set bs=2
7ed76dcf0d94 patch 8.0.1779: deleting in a block selection causes problems
Christian Brabandt <cb@256bit.org>
parents: 13620
diff changeset
21 call setline(1, ['case Arg is ', ' when Name_Async,', ' when Name_Num_Gangs,', 'end if;'])
7ed76dcf0d94 patch 8.0.1779: deleting in a block selection causes problems
Christian Brabandt <cb@256bit.org>
parents: 13620
diff changeset
22 exe "norm! ggjVj\<c-v>$o$A\<bs>\<esc>"
7ed76dcf0d94 patch 8.0.1779: deleting in a block selection causes problems
Christian Brabandt <cb@256bit.org>
parents: 13620
diff changeset
23 "call feedkeys("Vj\<c-v>$o$A\<bs>\<esc>", 'ti')
7ed76dcf0d94 patch 8.0.1779: deleting in a block selection causes problems
Christian Brabandt <cb@256bit.org>
parents: 13620
diff changeset
24 call assert_equal(["case Arg is ", " when Name_Async", " when Name_Num_Gangs,", "end if;"],
7ed76dcf0d94 patch 8.0.1779: deleting in a block selection causes problems
Christian Brabandt <cb@256bit.org>
parents: 13620
diff changeset
25 \ getline(1,'$'))
7ed76dcf0d94 patch 8.0.1779: deleting in a block selection causes problems
Christian Brabandt <cb@256bit.org>
parents: 13620
diff changeset
26 " reset to sane state
7ed76dcf0d94 patch 8.0.1779: deleting in a block selection causes problems
Christian Brabandt <cb@256bit.org>
parents: 13620
diff changeset
27 let &bs = _bs
7ed76dcf0d94 patch 8.0.1779: deleting in a block selection causes problems
Christian Brabandt <cb@256bit.org>
parents: 13620
diff changeset
28 bwipe!
7ed76dcf0d94 patch 8.0.1779: deleting in a block selection causes problems
Christian Brabandt <cb@256bit.org>
parents: 13620
diff changeset
29 endfunc
13620
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31 " vim: shiftwidth=2 sts=2 expandtab