Mercurial > vim
annotate src/testdir/test88.in @ 9303:1cc29584ef6d v7.4.1934
commit https://github.com/vim/vim/commit/9bd31860521b53ad657c4d6d320d670e30a049f8
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jun 13 22:58:39 2016 +0200
patch 7.4.1934
Problem: New style tests not executed with MinGW compiler.
Solution: Add new style test support. (Yegappan Lakshmanan)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 13 Jun 2016 23:00:06 +0200 |
parents | 43f444efe6a2 |
children |
rev | line source |
---|---|
3986 | 1 vim: set ft=vim |
2 | |
3 Tests for correct display (cursor column position) with +conceal and | |
4 tabulators. | |
5 | |
6 STARTTEST | |
7 :so small.vim | |
8 :if !has('conceal') | |
9 e! test.ok | |
10 wq! test.out | |
11 :endif | |
12 :" Conceal settings. | |
13 :set conceallevel=2 | |
14 :set concealcursor=nc | |
15 :syntax match test /|/ conceal | |
16 :" Save current cursor position. Only works in <expr> mode, can't be used | |
17 :" with :normal because it moves the cursor to the command line. Thanks to ZyX | |
18 :" <zyx.vim@gmail.com> for the idea to use an <expr> mapping. | |
19 :let positions = [] | |
20 :nnoremap <expr> GG ":let positions += ['".screenrow().":".screencol()."']\n" | |
21 :" Start test. | |
22 /^start: | |
23 :normal ztj | |
24 GGk | |
25 :" We should end up in the same column when running these commands on the two | |
26 :" lines. | |
27 :normal ft | |
28 GGk | |
29 :normal $ | |
30 GGk | |
31 :normal 0j | |
32 GGk | |
33 :normal ft | |
34 GGk | |
35 :normal $ | |
36 GGk | |
37 :normal 0j0j | |
38 GGk | |
39 :" Same for next test block. | |
40 :normal ft | |
41 GGk | |
42 :normal $ | |
43 GGk | |
44 :normal 0j | |
45 GGk | |
46 :normal ft | |
47 GGk | |
48 :normal $ | |
49 GGk | |
50 :normal 0j0j | |
51 GGk | |
52 :" And check W with multiple tabs and conceals in a line. | |
53 :normal W | |
54 GGk | |
55 :normal W | |
56 GGk | |
57 :normal W | |
58 GGk | |
59 :normal $ | |
60 GGk | |
61 :normal 0j | |
62 GGk | |
63 :normal W | |
64 GGk | |
65 :normal W | |
66 GGk | |
67 :normal W | |
68 GGk | |
69 :normal $ | |
70 GGk | |
5174
42d592dbbec3
updated for version 7.4a.013
Bram Moolenaar <bram@vim.org>
parents:
3986
diff
changeset
|
71 :set lbr |
42d592dbbec3
updated for version 7.4a.013
Bram Moolenaar <bram@vim.org>
parents:
3986
diff
changeset
|
72 :normal $ |
42d592dbbec3
updated for version 7.4a.013
Bram Moolenaar <bram@vim.org>
parents:
3986
diff
changeset
|
73 GGk |
6627 | 74 :set list listchars=tab:>- |
75 :normal 0 | |
76 GGk | |
77 :normal W | |
78 GGk | |
79 :normal W | |
80 GGk | |
81 :normal W | |
82 GGk | |
83 :normal $ | |
84 GGk | |
3986 | 85 :" Display result. |
86 :call append('$', 'end:') | |
87 :call append('$', positions) | |
88 :/^end/,$wq! test.out | |
89 ENDTEST | |
90 | |
91 start: | |
92 .concealed. text | |
93 |concealed| text | |
94 | |
95 .concealed. text | |
96 |concealed| text | |
97 | |
98 .a. .b. .c. .d. | |
99 |a| |b| |c| |d| |