Mercurial > vim
annotate src/testdir/test_textformat.vim @ 12992:5532b5176870 v8.0.1372
patch 8.0.1372: profile log may be truncated halfway a character
commit https://github.com/vim/vim/commit/ac112f01a6930c9d15cf0360b657373699916bfd
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Dec 5 16:46:28 2017 +0100
patch 8.0.1372: profile log may be truncated halfway a character
Problem: Profile log may be truncated halfway a character.
Solution: Find the start of the character. (Ozaki Kiichi, closes https://github.com/vim/vim/issues/2385)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 05 Dec 2017 17:00:07 +0100 |
parents | 90aaa974594e |
children | d9a94be389b5 |
rev | line source |
---|---|
12851
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Tests for the various 'formatoptions' settings |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 func Test_text_format() |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 enew! |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 setl noai tw=2 fo=t |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 call append('$', [ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 \ '{', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 \ ' ', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 \ '', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 \ '}']) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 exe "normal /^{/+1\n0" |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 normal gRa b |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 let lnum = line('.') |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 call assert_equal([ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 \ 'a', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 \ 'b'], getline(lnum - 1, lnum)) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 normal ggdG |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 setl ai tw=2 fo=tw |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 call append('$', [ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 \ '{', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 \ 'a b ', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 \ '', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 \ 'a ', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 \ '}']) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 exe "normal /^{/+1\n0" |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 normal gqgqjjllab |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 let lnum = line('.') |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 call assert_equal([ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 \ 'a ', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 \ 'b ', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 \ '', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
33 \ 'a ', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
34 \ 'b'], getline(lnum - 4, lnum)) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
35 |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
36 normal ggdG |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
37 setl tw=3 fo=t |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
38 call append('$', [ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
39 \ '{', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
40 \ "a \<C-A>", |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
41 \ '}']) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
42 exe "normal /^{/+1\n0" |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
43 exe "normal gqgqo\na \<C-V>\<C-A>" |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
44 let lnum = line('.') |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
45 call assert_equal([ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
46 \ 'a', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
47 \ "\<C-A>", |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
48 \ '', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
49 \ 'a', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
50 \ "\<C-A>"], getline(lnum - 4, lnum)) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
51 |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
52 normal ggdG |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
53 setl tw=2 fo=tcq1 comments=:# |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
54 call append('$', [ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
55 \ '{', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
56 \ 'a b', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
57 \ '#a b', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
58 \ '}']) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
59 exe "normal /^{/+1\n0" |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
60 exe "normal gqgqjgqgqo\na b\n#a b" |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
61 let lnum = line('.') |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
62 call assert_equal([ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
63 \ 'a b', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
64 \ '#a b', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
65 \ '', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
66 \ 'a b', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
67 \ '#a b'], getline(lnum - 4, lnum)) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
68 |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
69 normal ggdG |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
70 setl tw=5 fo=tcn comments=:# |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
71 call append('$', [ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
72 \ '{', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
73 \ ' 1 a', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
74 \ '# 1 a', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
75 \ '}']) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
76 exe "normal /^{/+1\n0" |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
77 exe "normal A b\<Esc>jA b" |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
78 let lnum = line('.') |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
79 call assert_equal([ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
80 \ ' 1 a', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
81 \ ' b', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
82 \ '# 1 a', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
83 \ '# b'], getline(lnum - 3, lnum)) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
84 |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
85 normal ggdG |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
86 setl tw=5 fo=t2a si |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
87 call append('$', [ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
88 \ '{', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
89 \ '', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
90 \ ' x a', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
91 \ ' b', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
92 \ ' c', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
93 \ '', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
94 \ '}']) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
95 exe "normal /^{/+3\n0" |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
96 exe "normal i \<Esc>A_" |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
97 let lnum = line('.') |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
98 call assert_equal([ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
99 \ '', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
100 \ ' x a', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
101 \ ' b_', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
102 \ ' c', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
103 \ ''], getline(lnum - 2, lnum + 2)) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
104 |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
105 normal ggdG |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
106 setl tw=5 fo=qn comments=:# |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
107 call append('$', [ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
108 \ '{', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
109 \ '# 1 a b', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
110 \ '}']) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
111 exe "normal /^{/+1\n5|" |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
112 normal gwap |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
113 call assert_equal(5, col('.')) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
114 let lnum = line('.') |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
115 call assert_equal([ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
116 \ '# 1 a', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
117 \ '# b'], getline(lnum, lnum + 1)) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
118 |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
119 normal ggdG |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
120 setl tw=5 fo=q2 comments=:# |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
121 call append('$', [ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
122 \ '{', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
123 \ '# x', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
124 \ '# a b', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
125 \ '}']) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
126 exe "normal /^{/+1\n0" |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
127 normal gwap |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
128 let lnum = line('.') |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
129 call assert_equal([ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
130 \ '# x a', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
131 \ '# b'], getline(lnum, lnum + 1)) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
132 |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
133 normal ggdG |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
134 setl tw& fo=a |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
135 call append('$', [ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
136 \ '{', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
137 \ ' 1aa', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
138 \ ' 2bb', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
139 \ '}']) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
140 exe "normal /^{/+2\n0" |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
141 normal I^^ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
142 call assert_equal('{ 1aa ^^2bb }', getline('.')) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
143 |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
144 normal ggdG |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
145 setl tw=20 fo=an12wcq comments=s1:/*,mb:*,ex:*/ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
146 call append('$', [ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
147 \ '/* abc def ghi jkl ', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
148 \ ' * mno pqr stu', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
149 \ ' */']) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
150 exe "normal /mno pqr/\n" |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
151 normal A vwx yz |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
152 let lnum = line('.') |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
153 call assert_equal([ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
154 \ ' * mno pqr stu ', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
155 \ ' * vwx yz', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
156 \ ' */'], getline(lnum - 1, lnum + 1)) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
157 |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
158 normal ggdG |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
159 setl tw=12 fo=tqnc comments=:# |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
160 call setline('.', '# 1 xxxxx') |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
161 normal A foobar |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
162 call assert_equal([ |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
163 \ '# 1 xxxxx', |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
164 \ '# foobar'], getline(1, 2)) |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
165 |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
166 setl ai& tw& fo& si& comments& |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
167 enew! |
90aaa974594e
patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
168 endfunc |