Mercurial > vim
annotate src/testdir/test30.in @ 6592:599112d00aa9 v7.4.622
updated for version 7.4.622
Problem: Compiler warning for unused argument.
Solution: Add UNUSED.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Thu, 05 Feb 2015 20:29:59 +0100 |
parents | 5edcd4ef88df |
children | 050e6df85f99 |
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 | |
7 :" first write three test files, one in each format | |
8 :set fileformat=unix | |
9 :set fileformats= | |
10 :/^1/w! XX1 | |
11 :/^2/w! XX2 | |
12 :/^3/w! XX3 | |
13 :/^4/w! XX4 | |
14 :/^5/w! XX5 | |
15 :/^6/w! XX6 | |
16 :/^7/w! XX7 | |
17 :/^8/w! XX8 | |
18 :/^9/w! XX9 | |
19 :/^10/w! XX10 | |
20 :/^unix/;/eof/-1w! XXUnix | |
21 :/^dos/;/eof/-1w! XXDos | |
22 :set bin noeol | |
23 :$w! XXMac | |
24 :set nobin eol | |
25 :bwipe XXUnix XXDos XXMac | |
26 :" create mixed format files | |
1709 | 27 :if has("vms") |
28 : !copy XXUnix,XXDos XXUxDs. | |
29 : !copy XXUnix,XXMac XXUxMac. | |
30 : !copy XXDos,XXMac XXDosMac. | |
31 : !copy XXUnix,XXDos,XXMac XXUxDsMc. | |
2485
5edcd4ef88df
Small changes to the test files. (John Beckett)
Bram Moolenaar <bram@vim.org>
parents:
1709
diff
changeset
|
32 :elseif has("win32") |
5edcd4ef88df
Small changes to the test files. (John Beckett)
Bram Moolenaar <bram@vim.org>
parents:
1709
diff
changeset
|
33 : !copy /b XXUnix+XXDos XXUxDs |
5edcd4ef88df
Small changes to the test files. (John Beckett)
Bram Moolenaar <bram@vim.org>
parents:
1709
diff
changeset
|
34 : !copy /b XXUnix+XXMac XXUxMac |
5edcd4ef88df
Small changes to the test files. (John Beckett)
Bram Moolenaar <bram@vim.org>
parents:
1709
diff
changeset
|
35 : !copy /b XXDos+XXMac XXDosMac |
5edcd4ef88df
Small changes to the test files. (John Beckett)
Bram Moolenaar <bram@vim.org>
parents:
1709
diff
changeset
|
36 : !copy /b XXUnix+XXDos+XXMac XXUxDsMc |
1709 | 37 :else |
38 : !cat XXUnix XXDos >XXUxDs | |
39 : !cat XXUnix XXMac >XXUxMac | |
40 : !cat XXDos XXMac >XXDosMac | |
41 : !cat XXUnix XXDos XXMac >XXUxDsMc | |
42 :endif | |
7 | 43 :" |
44 :" try reading and writing with 'fileformats' empty | |
45 :set fileformat=unix | |
46 :e! XXUnix | |
47 :w! test.out | |
48 :e! XXDos | |
57 | 49 :w! XXtt01 |
7 | 50 :e! XXMac |
57 | 51 :w! XXtt02 |
7 | 52 :bwipe XXUnix XXDos XXMac |
53 :set fileformat=dos | |
54 :e! XXUnix | |
57 | 55 :w! XXtt11 |
7 | 56 :e! XXDos |
57 | 57 :w! XXtt12 |
7 | 58 :e! XXMac |
57 | 59 :w! XXtt13 |
7 | 60 :bwipe XXUnix XXDos XXMac |
61 :set fileformat=mac | |
62 :e! XXUnix | |
57 | 63 :w! XXtt21 |
7 | 64 :e! XXDos |
57 | 65 :w! XXtt22 |
7 | 66 :e! XXMac |
57 | 67 :w! XXtt23 |
7 | 68 :bwipe XXUnix XXDos XXMac |
69 :" | |
70 :" try reading and writing with 'fileformats' set to one format | |
71 :set fileformats=unix | |
72 :e! XXUxDsMc | |
57 | 73 :w! XXtt31 |
7 | 74 :bwipe XXUxDsMc |
75 :set fileformats=dos | |
76 :e! XXUxDsMc | |
57 | 77 :w! XXtt32 |
7 | 78 :bwipe XXUxDsMc |
79 :set fileformats=mac | |
80 :e! XXUxDsMc | |
57 | 81 :w! XXtt33 |
7 | 82 :bwipe XXUxDsMc |
83 :" | |
84 :" try reading and writing with 'fileformats' set to two formats | |
85 :set fileformats=unix,dos | |
86 :e! XXUxDsMc | |
57 | 87 :w! XXtt41 |
7 | 88 :bwipe XXUxDsMc |
89 :e! XXUxMac | |
57 | 90 :w! XXtt42 |
7 | 91 :bwipe XXUxMac |
92 :e! XXDosMac | |
57 | 93 :w! XXtt43 |
7 | 94 :bwipe XXDosMac |
95 :set fileformats=unix,mac | |
96 :e! XXUxDs | |
57 | 97 :w! XXtt51 |
7 | 98 :bwipe XXUxDs |
99 :e! XXUxDsMc | |
57 | 100 :w! XXtt52 |
7 | 101 :bwipe XXUxDsMc |
102 :e! XXDosMac | |
57 | 103 :w! XXtt53 |
7 | 104 :bwipe XXDosMac |
105 :set fileformats=dos,mac | |
106 :e! XXUxDs | |
57 | 107 :w! XXtt61 |
7 | 108 :bwipe XXUxDs |
109 :e! XXUxMac | |
57 | 110 :w! XXtt62 |
7 | 111 :bwipe XXUxMac |
112 :e! XXUxDsMc | |
57 | 113 :w! XXtt63 |
7 | 114 :bwipe XXUxDsMc |
115 :" | |
116 :" try reading and writing with 'fileformats' set to three formats | |
117 :set fileformats=unix,dos,mac | |
118 :e! XXUxDsMc | |
57 | 119 :w! XXtt71 |
7 | 120 :bwipe XXUxDsMc |
121 :set fileformats=mac,dos,unix | |
122 :e! XXUxDsMc | |
57 | 123 :w! XXtt81 |
7 | 124 :bwipe XXUxDsMc |
125 :" try with 'binary' set | |
126 :set fileformats=mac,unix,dos | |
127 :set binary | |
128 :e! XXUxDsMc | |
57 | 129 :w! XXtt91 |
7 | 130 :bwipe XXUxDsMc |
131 :set fileformats=mac | |
132 :e! XXUxDsMc | |
57 | 133 :w! XXtt92 |
7 | 134 :bwipe XXUxDsMc |
135 :set fileformats=dos | |
136 :e! XXUxDsMc | |
57 | 137 :w! XXtt93 |
138 :" | |
139 :" Append "END" to each file so that we can see what the last written char was. | |
140 :set fileformat=unix nobin | |
141 ggdGaEND:w >>XXtt01 | |
142 :w >>XXtt02 | |
143 :w >>XXtt11 | |
144 :w >>XXtt12 | |
145 :w >>XXtt13 | |
146 :w >>XXtt21 | |
147 :w >>XXtt22 | |
148 :w >>XXtt23 | |
149 :w >>XXtt31 | |
150 :w >>XXtt32 | |
151 :w >>XXtt33 | |
152 :w >>XXtt41 | |
153 :w >>XXtt42 | |
154 :w >>XXtt43 | |
155 :w >>XXtt51 | |
156 :w >>XXtt52 | |
157 :w >>XXtt53 | |
158 :w >>XXtt61 | |
159 :w >>XXtt62 | |
160 :w >>XXtt63 | |
161 :w >>XXtt71 | |
162 :w >>XXtt81 | |
163 :w >>XXtt91 | |
164 :w >>XXtt92 | |
165 :w >>XXtt93 | |
166 :" | |
167 :" Concatenate the results. | |
168 :" Make fileformat of test.out the native fileformat. | |
169 :" Add a newline at the end. | |
170 :set binary | |
171 :e! test.out | |
172 :$r XXtt01 | |
173 :$r XXtt02 | |
174 Go1:$r XXtt11 | |
175 :$r XXtt12 | |
176 :$r XXtt13 | |
177 Go2:$r XXtt21 | |
178 :$r XXtt22 | |
179 :$r XXtt23 | |
180 Go3:$r XXtt31 | |
181 :$r XXtt32 | |
182 :$r XXtt33 | |
183 Go4:$r XXtt41 | |
184 :$r XXtt42 | |
185 :$r XXtt43 | |
186 Go5:$r XXtt51 | |
187 :$r XXtt52 | |
188 :$r XXtt53 | |
189 Go6:$r XXtt61 | |
190 :$r XXtt62 | |
191 :$r XXtt63 | |
192 Go7:$r XXtt71 | |
193 Go8:$r XXtt81 | |
194 Go9:$r XXtt91 | |
195 :$r XXtt92 | |
196 :$r XXtt93 | |
197 Go10:$r XXUnix | |
198 :set nobinary ff& | |
199 :w | |
7 | 200 :qa! |
201 ENDTEST | |
202 | |
203 1 | |
204 2 | |
205 3 | |
206 4 | |
207 5 | |
208 6 | |
209 7 | |
210 8 | |
211 9 | |
212 10 | |
213 | |
214 unix | |
215 unix | |
216 eof | |
217 | |
218 dos | |
219 dos | |
220 eof | |
221 | |
222 mac mac |