1 Test for a lot of variations of the 'fileformats' option
3 Note: This test will fail if "cat" is not available.
7 :" first write three test files, one in each format
20 :/^unix/;/eof/-1w! XXUnix
21 :/^dos/;/eof/-1w! XXDos
25 :bwipe XXUnix XXDos XXMac
26 :" create mixed format files
28 : !copy XXUnix,XXDos XXUxDs.
29 : !copy XXUnix,XXMac XXUxMac.
30 : !copy XXDos,XXMac XXDosMac.
31 : !copy XXUnix,XXDos,XXMac XXUxDsMc.
33 : !cat XXUnix XXDos >XXUxDs
34 : !cat XXUnix XXMac >XXUxMac
35 : !cat XXDos XXMac >XXDosMac
36 : !cat XXUnix XXDos XXMac >XXUxDsMc
39 :" try reading and writing with 'fileformats' empty
47 :bwipe XXUnix XXDos XXMac
55 :bwipe XXUnix XXDos XXMac
63 :bwipe XXUnix XXDos XXMac
65 :" try reading and writing with 'fileformats' set to one format
79 :" try reading and writing with 'fileformats' set to two formats
80 :set fileformats=unix,dos
90 :set fileformats=unix,mac
100 :set fileformats=dos,mac
111 :" try reading and writing with 'fileformats' set to three formats
112 :set fileformats=unix,dos,mac
116 :set fileformats=mac,dos,unix
120 :" try with 'binary' set
121 :set fileformats=mac,unix,dos
134 :" Append "END" to each file so that we can see what the last written char was.
135 :set fileformat=unix nobin
136 ggdGaEND
\e:w >>XXtt01
162 :" Concatenate the results.
163 :" Make fileformat of test.out the native fileformat.
164 :" Add a newline at the end.