Mercurial > vim
annotate src/testdir/test30.in @ 14652:f3b183c3d3e2 v8.1.0339
patch 8.1.0339: wrong highlight when 'incsearch' set and cancelling :s
commit https://github.com/vim/vim/commit/f13daa46da85a80dd05704cdde0660c2b2651a5a
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Aug 31 22:09:54 2018 +0200
patch 8.1.0339: wrong highlight when 'incsearch' set and cancelling :s
Problem: Wrong highlight when 'incsearch' set and cancelling :s.
Solution: Reset search line range. (Hirohito Higashi, Masamichi Abe)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 31 Aug 2018 22:15:05 +0200 |
parents | ae45d497868f |
children |
rev | line source |
---|---|
7 | 1 Test for a lot of variations of the 'fileformats' option |
2 | |
1668 | 3 Note: This test will fail if "cat" is not available. |
4 | |
7 | 5 STARTTEST |
6 :so small.vim | |
11091
ae45d497868f
patch 8.0.0433: beeps when running tests
Christian Brabandt <cb@256bit.org>
parents:
6635
diff
changeset
|
7 :set belloff=all |
7 | 8 :" first write three test files, one in each format |
9 :set fileformat=unix | |
10 :set fileformats= | |
11 :/^unix/;/eof/-1w! XXUnix | |
12 :/^dos/;/eof/-1w! XXDos | |
13 :set bin noeol | |
14 :$w! XXMac | |
6635 | 15 Gonoeol |
16 :$w! XXEol | |
7 | 17 :set nobin eol |
6635 | 18 :enew! |
7 | 19 :bwipe XXUnix XXDos XXMac |
20 :" create mixed format files | |
1709 | 21 :if has("vms") |
22 : !copy XXUnix,XXDos XXUxDs. | |
23 : !copy XXUnix,XXMac XXUxMac. | |
24 : !copy XXDos,XXMac XXDosMac. | |
6635 | 25 : !copy XXMac,XXEol XXMacEol. |
1709 | 26 : !copy XXUnix,XXDos,XXMac XXUxDsMc. |
2485
5edcd4ef88df
Small changes to the test files. (John Beckett)
Bram Moolenaar <bram@vim.org>
parents:
1709
diff
changeset
|
27 :elseif has("win32") |
5edcd4ef88df
Small changes to the test files. (John Beckett)
Bram Moolenaar <bram@vim.org>
parents:
1709
diff
changeset
|
28 : !copy /b XXUnix+XXDos XXUxDs |
5edcd4ef88df
Small changes to the test files. (John Beckett)
Bram Moolenaar <bram@vim.org>
parents:
1709
diff
changeset
|
29 : !copy /b XXUnix+XXMac XXUxMac |
5edcd4ef88df
Small changes to the test files. (John Beckett)
Bram Moolenaar <bram@vim.org>
parents:
1709
diff
changeset
|
30 : !copy /b XXDos+XXMac XXDosMac |
6635 | 31 : !copy /b XXMac+XXEol XXMacEol |
2485
5edcd4ef88df
Small changes to the test files. (John Beckett)
Bram Moolenaar <bram@vim.org>
parents:
1709
diff
changeset
|
32 : !copy /b XXUnix+XXDos+XXMac XXUxDsMc |
1709 | 33 :else |
34 : !cat XXUnix XXDos >XXUxDs | |
35 : !cat XXUnix XXMac >XXUxMac | |
36 : !cat XXDos XXMac >XXDosMac | |
6635 | 37 : !cat XXMac XXEol >XXMacEol |
1709 | 38 : !cat XXUnix XXDos XXMac >XXUxDsMc |
39 :endif | |
7 | 40 :" |
41 :" try reading and writing with 'fileformats' empty | |
42 :set fileformat=unix | |
43 :e! XXUnix | |
44 :w! test.out | |
45 :e! XXDos | |
57 | 46 :w! XXtt01 |
7 | 47 :e! XXMac |
57 | 48 :w! XXtt02 |
7 | 49 :bwipe XXUnix XXDos XXMac |
50 :set fileformat=dos | |
51 :e! XXUnix | |
57 | 52 :w! XXtt11 |
7 | 53 :e! XXDos |
57 | 54 :w! XXtt12 |
7 | 55 :e! XXMac |
57 | 56 :w! XXtt13 |
7 | 57 :bwipe XXUnix XXDos XXMac |
58 :set fileformat=mac | |
59 :e! XXUnix | |
57 | 60 :w! XXtt21 |
7 | 61 :e! XXDos |
57 | 62 :w! XXtt22 |
7 | 63 :e! XXMac |
57 | 64 :w! XXtt23 |
7 | 65 :bwipe XXUnix XXDos XXMac |
66 :" | |
67 :" try reading and writing with 'fileformats' set to one format | |
68 :set fileformats=unix | |
69 :e! XXUxDsMc | |
57 | 70 :w! XXtt31 |
7 | 71 :bwipe XXUxDsMc |
72 :set fileformats=dos | |
73 :e! XXUxDsMc | |
57 | 74 :w! XXtt32 |
7 | 75 :bwipe XXUxDsMc |
76 :set fileformats=mac | |
77 :e! XXUxDsMc | |
57 | 78 :w! XXtt33 |
7 | 79 :bwipe XXUxDsMc |
80 :" | |
81 :" try reading and writing with 'fileformats' set to two formats | |
82 :set fileformats=unix,dos | |
83 :e! XXUxDsMc | |
57 | 84 :w! XXtt41 |
7 | 85 :bwipe XXUxDsMc |
86 :e! XXUxMac | |
57 | 87 :w! XXtt42 |
7 | 88 :bwipe XXUxMac |
89 :e! XXDosMac | |
57 | 90 :w! XXtt43 |
7 | 91 :bwipe XXDosMac |
92 :set fileformats=unix,mac | |
93 :e! XXUxDs | |
57 | 94 :w! XXtt51 |
7 | 95 :bwipe XXUxDs |
96 :e! XXUxDsMc | |
57 | 97 :w! XXtt52 |
7 | 98 :bwipe XXUxDsMc |
99 :e! XXDosMac | |
57 | 100 :w! XXtt53 |
7 | 101 :bwipe XXDosMac |
6635 | 102 :e! XXEol |
103 ggO=&ffs | |
104 :=&ff | |
105 :w! XXtt54 | |
106 :bwipe XXEol | |
7 | 107 :set fileformats=dos,mac |
108 :e! XXUxDs | |
57 | 109 :w! XXtt61 |
7 | 110 :bwipe XXUxDs |
111 :e! XXUxMac | |
6635 | 112 ggO=&ffs |
113 :=&ff | |
114 :w! XXtt62 | |
7 | 115 :bwipe XXUxMac |
116 :e! XXUxDsMc | |
57 | 117 :w! XXtt63 |
7 | 118 :bwipe XXUxDsMc |
6635 | 119 :e! XXMacEol |
120 ggO=&ffs | |
121 :=&ff | |
122 :w! XXtt64 | |
123 :bwipe XXMacEol | |
7 | 124 :" |
125 :" try reading and writing with 'fileformats' set to three formats | |
126 :set fileformats=unix,dos,mac | |
127 :e! XXUxDsMc | |
57 | 128 :w! XXtt71 |
7 | 129 :bwipe XXUxDsMc |
6635 | 130 :e! XXEol |
131 ggO=&ffs | |
132 :=&ff | |
133 :w! XXtt72 | |
134 :bwipe XXEol | |
7 | 135 :set fileformats=mac,dos,unix |
136 :e! XXUxDsMc | |
57 | 137 :w! XXtt81 |
7 | 138 :bwipe XXUxDsMc |
6635 | 139 :e! XXEol |
140 ggO=&ffs | |
141 :=&ff | |
142 :w! XXtt82 | |
143 :bwipe XXEol | |
7 | 144 :" try with 'binary' set |
145 :set fileformats=mac,unix,dos | |
146 :set binary | |
147 :e! XXUxDsMc | |
57 | 148 :w! XXtt91 |
7 | 149 :bwipe XXUxDsMc |
150 :set fileformats=mac | |
151 :e! XXUxDsMc | |
57 | 152 :w! XXtt92 |
7 | 153 :bwipe XXUxDsMc |
154 :set fileformats=dos | |
155 :e! XXUxDsMc | |
57 | 156 :w! XXtt93 |
157 :" | |
158 :" Append "END" to each file so that we can see what the last written char was. | |
159 :set fileformat=unix nobin | |
160 ggdGaEND:w >>XXtt01 | |
161 :w >>XXtt02 | |
162 :w >>XXtt11 | |
163 :w >>XXtt12 | |
164 :w >>XXtt13 | |
165 :w >>XXtt21 | |
166 :w >>XXtt22 | |
167 :w >>XXtt23 | |
168 :w >>XXtt31 | |
169 :w >>XXtt32 | |
170 :w >>XXtt33 | |
171 :w >>XXtt41 | |
172 :w >>XXtt42 | |
173 :w >>XXtt43 | |
174 :w >>XXtt51 | |
175 :w >>XXtt52 | |
176 :w >>XXtt53 | |
6635 | 177 :w >>XXtt54 |
57 | 178 :w >>XXtt61 |
179 :w >>XXtt62 | |
180 :w >>XXtt63 | |
6635 | 181 :w >>XXtt64 |
57 | 182 :w >>XXtt71 |
6635 | 183 :w >>XXtt72 |
57 | 184 :w >>XXtt81 |
6635 | 185 :w >>XXtt82 |
57 | 186 :w >>XXtt91 |
187 :w >>XXtt92 | |
188 :w >>XXtt93 | |
189 :" | |
190 :" Concatenate the results. | |
191 :" Make fileformat of test.out the native fileformat. | |
192 :" Add a newline at the end. | |
193 :set binary | |
194 :e! test.out | |
195 :$r XXtt01 | |
196 :$r XXtt02 | |
197 Go1:$r XXtt11 | |
198 :$r XXtt12 | |
199 :$r XXtt13 | |
200 Go2:$r XXtt21 | |
201 :$r XXtt22 | |
202 :$r XXtt23 | |
203 Go3:$r XXtt31 | |
204 :$r XXtt32 | |
205 :$r XXtt33 | |
206 Go4:$r XXtt41 | |
207 :$r XXtt42 | |
208 :$r XXtt43 | |
209 Go5:$r XXtt51 | |
210 :$r XXtt52 | |
211 :$r XXtt53 | |
6635 | 212 :$r XXtt54 |
57 | 213 Go6:$r XXtt61 |
214 :$r XXtt62 | |
215 :$r XXtt63 | |
6635 | 216 :$r XXtt64 |
57 | 217 Go7:$r XXtt71 |
6635 | 218 :$r XXtt72 |
57 | 219 Go8:$r XXtt81 |
6635 | 220 :$r XXtt82 |
57 | 221 Go9:$r XXtt91 |
222 :$r XXtt92 | |
223 :$r XXtt93 | |
224 Go10:$r XXUnix | |
225 :set nobinary ff& | |
226 :w | |
7 | 227 :qa! |
228 ENDTEST | |
229 | |
230 unix | |
231 unix | |
232 eof | |
233 | |
234 dos | |
235 dos | |
236 eof | |
237 | |
238 mac mac |