Mercurial > vim
annotate src/testdir/test_blockedit.vim @ 22715:8968ed4ba4ba v8.2.1906
patch 8.2.1906: warning for signed/unsigned
Commit: https://github.com/vim/vim/commit/a360dbe3b63bdca93bbf8cc431578a446e8ce14c
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Oct 26 18:46:53 2020 +0100
patch 8.2.1906: warning for signed/unsigned
Problem: Warning for signed/unsigned.
Solution: Use size_t instead of int. (Mike Williams)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 26 Oct 2020 19:00:04 +0100 |
parents | 08940efa6b4e |
children | bd46322bea66 |
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 |