Mercurial > vim
annotate src/testdir/test_blockedit.vim @ 16326:1679b9f54946 v8.1.1168
patch 8.1.1168: not all screen update code of terminal is executed in tests
commit https://github.com/vim/vim/commit/87dcfd75c218107ca966c80a0a56b236be046fc9
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 13 22:35:29 2019 +0200
patch 8.1.1168: not all screen update code of terminal is executed in tests
Problem: Not all screen update code of the terminal window is executed in
tests.
Solution: Redraw before taking a screenshot.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 13 Apr 2019 22:45:04 +0200 |
parents | 7ed76dcf0d94 |
children | 70f1e352d599 |
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 " TODO: rewrite test39.in into this new style test |
4faf77b96432
patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 |
4faf77b96432
patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 func Test_blockinsert_indent() |
4faf77b96432
patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 new |
4faf77b96432
patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 filetype plugin indent on |
4faf77b96432
patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 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
|
9 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
|
10 call cursor(2, 3) |
4faf77b96432
patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 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
|
12 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
|
13 \ getline(1,'$')) |
4faf77b96432
patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 " reset to sane state |
4faf77b96432
patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 filetype off |
4faf77b96432
patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 bwipe! |
4faf77b96432
patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 endfunc |
4faf77b96432
patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 |
13814
7ed76dcf0d94
patch 8.0.1779: deleting in a block selection causes problems
Christian Brabandt <cb@256bit.org>
parents:
13620
diff
changeset
|
19 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
|
20 new |
7ed76dcf0d94
patch 8.0.1779: deleting in a block selection causes problems
Christian Brabandt <cb@256bit.org>
parents:
13620
diff
changeset
|
21 let _bs = &bs |
7ed76dcf0d94
patch 8.0.1779: deleting in a block selection causes problems
Christian Brabandt <cb@256bit.org>
parents:
13620
diff
changeset
|
22 set bs=2 |
7ed76dcf0d94
patch 8.0.1779: deleting in a block selection causes problems
Christian Brabandt <cb@256bit.org>
parents:
13620
diff
changeset
|
23 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
|
24 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
|
25 "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
|
26 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
|
27 \ getline(1,'$')) |
7ed76dcf0d94
patch 8.0.1779: deleting in a block selection causes problems
Christian Brabandt <cb@256bit.org>
parents:
13620
diff
changeset
|
28 " 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
|
29 let &bs = _bs |
7ed76dcf0d94
patch 8.0.1779: deleting in a block selection causes problems
Christian Brabandt <cb@256bit.org>
parents:
13620
diff
changeset
|
30 bwipe! |
7ed76dcf0d94
patch 8.0.1779: deleting in a block selection causes problems
Christian Brabandt <cb@256bit.org>
parents:
13620
diff
changeset
|
31 endfunc |
13620
4faf77b96432
patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 |
4faf77b96432
patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
33 " vim: shiftwidth=2 sts=2 expandtab |