summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.1412
blob: e1d9967447b45e06e7fae8f6e71bb2d3ebda4490 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1412
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.1412
Problem:    Test 30 is old style.
Solution:   Turn it into a new style test. (Yegappan Lakshmanan, closes #4440)
Files:	    src/Makefile, src/testdir/Make_all.mak, src/testdir/Make_vms.mms,
            src/testdir/test30.in, src/testdir/test30.ok,
            src/testdir/test_fileformat.vim


*** ../vim-8.1.1411/src/Makefile	2019-05-25 19:51:03.772408479 +0200
--- src/Makefile	2019-05-27 22:18:04.383027066 +0200
***************
*** 2182,2188 ****
  test1 \
  	test_eval \
  	test3 \
! 	test30 test39 \
  	test42 test44 test48 test49 \
  	test52 test59 \
  	test64 test69 \
--- 2183,2189 ----
  test1 \
  	test_eval \
  	test3 \
! 	test39 \
  	test42 test44 test48 test49 \
  	test52 test59 \
  	test64 test69 \
*** ../vim-8.1.1411/src/testdir/Make_all.mak	2019-05-25 19:51:03.780408437 +0200
--- src/testdir/Make_all.mak	2019-05-27 22:18:04.383027066 +0200
***************
*** 42,48 ****
  
  # Tests that run on most systems, but not on VMS
  SCRIPTS_MORE4 = \
- 	test30.out \
  	test59.out \
  	test72.out \
  
--- 42,47 ----
*** ../vim-8.1.1411/src/testdir/Make_vms.mms	2019-05-19 21:44:03.978804771 +0200
--- src/testdir/Make_vms.mms	2019-05-27 22:18:04.387027046 +0200
***************
*** 74,80 ****
  .SUFFIXES : .out .in
  
  SCRIPT = test1.out test3.out \
!        test30.out test39.out \
         test42.out test44.out test48.out test49.out \
         test64.out test69.out \
         test72.out test77a.out test88.out \
--- 74,80 ----
  .SUFFIXES : .out .in
  
  SCRIPT = test1.out test3.out \
!        test39.out \
         test42.out test44.out test48.out test49.out \
         test64.out test69.out \
         test72.out test77a.out test88.out \
***************
*** 83,90 ****
  
  # Known problems:
  #
- # test30: bug, most probably - a problem around mac format
- #
  # test59: Failed/Hangs - VMS does not support spell files (file names
  # with too many dots).
  #
--- 83,88 ----
*** ../vim-8.1.1411/src/testdir/test30.in	2017-03-08 22:48:59.000000000 +0100
--- src/testdir/test30.in	1970-01-01 01:00:00.000000000 +0100
***************
*** 1,238 ****
- Test for a lot of variations of the 'fileformats' option
- 
- Note: This test will fail if "cat" is not available.
- 
- STARTTEST
- :so small.vim
- :set belloff=all
- :" first write three test files, one in each format
- :set fileformat=unix
- :set fileformats=
- :/^unix/;/eof/-1w! XXUnix
- :/^dos/;/eof/-1w! XXDos
- :set bin noeol
- :$w! XXMac
- Gonoeol
- :$w! XXEol
- :set nobin eol
- :enew!
- :bwipe XXUnix XXDos XXMac
- :" create mixed format files
- :if has("vms")
- : !copy XXUnix,XXDos XXUxDs.
- : !copy XXUnix,XXMac XXUxMac.
- : !copy XXDos,XXMac  XXDosMac.
- : !copy XXMac,XXEol  XXMacEol.
- : !copy XXUnix,XXDos,XXMac XXUxDsMc.
- :elseif has("win32")
- : !copy /b XXUnix+XXDos XXUxDs
- : !copy /b XXUnix+XXMac XXUxMac
- : !copy /b XXDos+XXMac XXDosMac
- : !copy /b XXMac+XXEol XXMacEol
- : !copy /b XXUnix+XXDos+XXMac XXUxDsMc
- :else
- : !cat XXUnix XXDos >XXUxDs
- : !cat XXUnix XXMac >XXUxMac
- : !cat XXDos XXMac >XXDosMac
- : !cat XXMac XXEol >XXMacEol
- : !cat XXUnix XXDos XXMac >XXUxDsMc
- :endif
- :"
- :" try reading and writing with 'fileformats' empty
- :set fileformat=unix
- :e! XXUnix
- :w! test.out
- :e! XXDos
- :w! XXtt01
- :e! XXMac
- :w! XXtt02
- :bwipe XXUnix XXDos XXMac
- :set fileformat=dos
- :e! XXUnix
- :w! XXtt11
- :e! XXDos
- :w! XXtt12
- :e! XXMac
- :w! XXtt13
- :bwipe XXUnix XXDos XXMac
- :set fileformat=mac
- :e! XXUnix
- :w! XXtt21
- :e! XXDos
- :w! XXtt22
- :e! XXMac
- :w! XXtt23
- :bwipe XXUnix XXDos XXMac
- :"
- :" try reading and writing with 'fileformats' set to one format
- :set fileformats=unix
- :e! XXUxDsMc
- :w! XXtt31
- :bwipe XXUxDsMc
- :set fileformats=dos
- :e! XXUxDsMc
- :w! XXtt32
- :bwipe XXUxDsMc
- :set fileformats=mac
- :e! XXUxDsMc
- :w! XXtt33
- :bwipe XXUxDsMc
- :"
- :" try reading and writing with 'fileformats' set to two formats
- :set fileformats=unix,dos
- :e! XXUxDsMc
- :w! XXtt41
- :bwipe XXUxDsMc
- :e! XXUxMac
- :w! XXtt42
- :bwipe XXUxMac
- :e! XXDosMac
- :w! XXtt43
- :bwipe XXDosMac
- :set fileformats=unix,mac
- :e! XXUxDs
- :w! XXtt51
- :bwipe XXUxDs
- :e! XXUxDsMc
- :w! XXtt52
- :bwipe XXUxDsMc
- :e! XXDosMac
- :w! XXtt53
- :bwipe XXDosMac
- :e! XXEol
- ggO=&ffs
- :=&ff
- :w! XXtt54
- :bwipe XXEol
- :set fileformats=dos,mac
- :e! XXUxDs
- :w! XXtt61
- :bwipe XXUxDs
- :e! XXUxMac
- ggO=&ffs
- :=&ff
- :w! XXtt62
- :bwipe XXUxMac
- :e! XXUxDsMc
- :w! XXtt63
- :bwipe XXUxDsMc
- :e! XXMacEol
- ggO=&ffs
- :=&ff
- :w! XXtt64
- :bwipe XXMacEol
- :"
- :" try reading and writing with 'fileformats' set to three formats
- :set fileformats=unix,dos,mac
- :e! XXUxDsMc
- :w! XXtt71
- :bwipe XXUxDsMc
- :e! XXEol
- ggO=&ffs
- :=&ff
- :w! XXtt72
- :bwipe XXEol
- :set fileformats=mac,dos,unix
- :e! XXUxDsMc
- :w! XXtt81
- :bwipe XXUxDsMc
- :e! XXEol
- ggO=&ffs
- :=&ff
- :w! XXtt82
- :bwipe XXEol
- :" try with 'binary' set
- :set fileformats=mac,unix,dos
- :set binary
- :e! XXUxDsMc
- :w! XXtt91
- :bwipe XXUxDsMc
- :set fileformats=mac
- :e! XXUxDsMc
- :w! XXtt92
- :bwipe XXUxDsMc
- :set fileformats=dos
- :e! XXUxDsMc
- :w! XXtt93
- :"
- :" Append "END" to each file so that we can see what the last written char was.
- :set fileformat=unix nobin
- ggdGaEND:w >>XXtt01
- :w >>XXtt02
- :w >>XXtt11
- :w >>XXtt12
- :w >>XXtt13
- :w >>XXtt21
- :w >>XXtt22
- :w >>XXtt23
- :w >>XXtt31
- :w >>XXtt32
- :w >>XXtt33
- :w >>XXtt41
- :w >>XXtt42
- :w >>XXtt43
- :w >>XXtt51
- :w >>XXtt52
- :w >>XXtt53
- :w >>XXtt54
- :w >>XXtt61
- :w >>XXtt62
- :w >>XXtt63
- :w >>XXtt64
- :w >>XXtt71
- :w >>XXtt72
- :w >>XXtt81
- :w >>XXtt82
- :w >>XXtt91
- :w >>XXtt92
- :w >>XXtt93
- :"
- :" Concatenate the results.
- :" Make fileformat of test.out the native fileformat.
- :" Add a newline at the end.
- :set binary
- :e! test.out
- :$r XXtt01
- :$r XXtt02
- Go1:$r XXtt11
- :$r XXtt12
- :$r XXtt13
- Go2:$r XXtt21
- :$r XXtt22
- :$r XXtt23
- Go3:$r XXtt31
- :$r XXtt32
- :$r XXtt33
- Go4:$r XXtt41
- :$r XXtt42
- :$r XXtt43
- Go5:$r XXtt51
- :$r XXtt52
- :$r XXtt53
- :$r XXtt54
- Go6:$r XXtt61
- :$r XXtt62
- :$r XXtt63
- :$r XXtt64
- Go7:$r XXtt71
- :$r XXtt72
- Go8:$r XXtt81
- :$r XXtt82
- Go9:$r XXtt91
- :$r XXtt92
- :$r XXtt93
- Go10:$r XXUnix
- :set nobinary ff&
- :w
- :qa!
- ENDTEST
- 
- unix
- unix
- eof
- 
- dos
- dos
- eof
- 
- mac
mac
--- 0 ----
*** ../vim-8.1.1411/src/testdir/test30.ok	2016-10-12 17:37:44.000000000 +0200
--- src/testdir/test30.ok	1970-01-01 01:00:00.000000000 +0100
***************
*** 1,130 ****
- unix
- unix
- dos
- dos
- END
- mac
mac
- END
- 1
- unix
- unix
- END
- dos
- dos
- END
- mac
mac

- END
- 2
- unix
- unix
- 
END
- dos
- dos
- 
END
- mac
mac
END
- 3
- unix
- unix
- dos
- dos
- mac
mac
- END
- unix
- unix
- dos
- dos
- mac
mac

- END
- unix
- unix
- dos
- dos
- mac
mac
END
- 4
- unix
- unix
- dos
- dos
- mac
mac
- END
- unix
- unix
- mac
mac
- END
- dos
- dos
- mac
mac

- END
- 5
- unix
- unix
- dos
- dos
- END
- unix
- unix
- dos
- dos
- mac
mac
- END
- dos
- dos
- mac
mac
END
- unix,mac:unix
- noeol
- END
- 6
- unix
- unix
- dos
- dos
- END
- dos,mac:dos
- unix
- unix
- mac
mac

- END
- unix
- unix
- dos
- dos
- mac
mac

- END
- dos,mac:mac
mac
mac
noeol
END
- 7
- unix
- unix
- dos
- dos
- mac
mac
- END
- unix,dos,mac:unix
- noeol
- END
- 8
- unix
- unix
- dos
- dos
- mac
mac
- END
- mac,dos,unix:mac
noeol
END
- 9
- unix
- unix
- dos
- dos
- mac
mac
END
- unix
- unix
- dos
- dos
- mac
mac
END
- unix
- unix
- dos
- dos
- mac
mac
END
- 10
- unix
- unix
--- 0 ----
*** ../vim-8.1.1411/src/testdir/test_fileformat.vim	2017-01-24 15:36:35.000000000 +0100
--- src/testdir/test_fileformat.vim	2019-05-27 22:18:04.387027046 +0200
***************
*** 1,5 ****
- " Test behavior of fileformat after bwipeout of last buffer
  
  func Test_fileformat_after_bw()
    bwipeout
    set fileformat&
--- 1,5 ----
  
+ " Test behavior of fileformat after bwipeout of last buffer
  func Test_fileformat_after_bw()
    bwipeout
    set fileformat&
***************
*** 31,33 ****
--- 31,278 ----
    au! BufReadPre Xfile
    bw!
  endfunc
+ 
+ " Convert the contents of a file into a literal string
+ func s:file2str(fname)
+   let b = readfile(a:fname, 'B')
+   let s = ''
+   for c in b
+     let s .= nr2char(c)
+   endfor
+   return s
+ endfunc
+ 
+ " Concatenate the contents of files 'f1' and 'f2' and create 'destfile'
+ func s:concat_files(f1, f2, destfile)
+   let b1 = readfile(a:f1, 'B')
+   let b2 = readfile(a:f2, 'B')
+   let b3 = b1 + b2
+   call writefile(b3, a:destfile, 'B')
+ endfun
+ 
+ " Test for a lot of variations of the 'fileformats' option
+ func Test_fileformats()
+   " create three test files, one in each format
+   call writefile(['unix', 'unix'], 'XXUnix')
+   call writefile(["dos\r", "dos\r"], 'XXDos')
+   call writefile(["mac\rmac\r"], 'XXMac', 'b')
+   " create a file with no End Of Line
+   call writefile(["noeol"], 'XXEol', 'b')
+   " create mixed format files
+   call s:concat_files('XXUnix', 'XXDos', 'XXUxDs')
+   call s:concat_files('XXUnix', 'XXMac', 'XXUxMac')
+   call s:concat_files('XXDos', 'XXMac', 'XXDosMac')
+   call s:concat_files('XXMac', 'XXEol', 'XXMacEol')
+   call s:concat_files('XXUxDs', 'XXMac', 'XXUxDsMc')
+ 
+   new
+ 
+   " Test 1: try reading and writing with 'fileformats' empty
+   set fileformats=
+ 
+   " try with 'fileformat' set to 'unix'
+   set fileformat=unix
+   e! XXUnix
+   w! Xtest
+   call assert_equal("unix\nunix\n", s:file2str('Xtest'))
+   e! XXDos
+   w! Xtest
+   call assert_equal("dos\r\ndos\r\n", s:file2str('Xtest'))
+   e! XXMac
+   w! Xtest
+   call assert_equal("mac\rmac\r\n", s:file2str('Xtest'))
+   bwipe XXUnix XXDos XXMac
+ 
+   " try with 'fileformat' set to 'dos'
+   set fileformat=dos
+   e! XXUnix
+   w! Xtest
+   call assert_equal("unix\r\nunix\r\n", s:file2str('Xtest'))
+   e! XXDos
+   w! Xtest
+   call assert_equal("dos\r\ndos\r\n", s:file2str('Xtest'))
+   e! XXMac
+   w! Xtest
+   call assert_equal("mac\rmac\r\r\n", s:file2str('Xtest'))
+   bwipe XXUnix XXDos XXMac
+ 
+   " try with 'fileformat' set to 'mac'
+   set fileformat=mac
+   e! XXUnix
+   w! Xtest
+   call assert_equal("unix\nunix\n\r", s:file2str('Xtest'))
+   e! XXDos
+   w! Xtest
+   call assert_equal("dos\r\ndos\r\n\r", s:file2str('Xtest'))
+   e! XXMac
+   w! Xtest
+   call assert_equal("mac\rmac\r", s:file2str('Xtest'))
+   bwipe XXUnix XXDos XXMac
+ 
+   " Test 2: try reading and writing with 'fileformats' set to one format
+ 
+   " try with 'fileformats' set to 'unix'
+   set fileformats=unix
+   e! XXUxDsMc
+   w! Xtest
+   call assert_equal("unix\nunix\ndos\r\ndos\r\nmac\rmac\r\n",
+ 	      \ s:file2str('Xtest'))
+   bwipe XXUxDsMc
+ 
+   " try with 'fileformats' set to 'dos'
+   set fileformats=dos
+   e! XXUxDsMc
+   w! Xtest
+   call assert_equal("unix\r\nunix\r\ndos\r\ndos\r\nmac\rmac\r\r\n",
+ 	      \ s:file2str('Xtest'))
+   bwipe XXUxDsMc
+ 
+   " try with 'fileformats' set to 'mac'
+   set fileformats=mac
+   e! XXUxDsMc
+   w! Xtest
+   call assert_equal("unix\nunix\ndos\r\ndos\r\nmac\rmac\r",
+ 	      \ s:file2str('Xtest'))
+   bwipe XXUxDsMc
+ 
+   " Test 3: try reading and writing with 'fileformats' set to two formats
+ 
+   " try with 'fileformats' set to 'unix,dos'
+   set fileformats=unix,dos
+   e! XXUxDsMc
+   w! Xtest
+   call assert_equal("unix\nunix\ndos\r\ndos\r\nmac\rmac\r\n",
+ 	      \ s:file2str('Xtest'))
+   bwipe XXUxDsMc
+ 
+   e! XXUxMac
+   w! Xtest
+   call assert_equal("unix\nunix\nmac\rmac\r\n", s:file2str('Xtest'))
+   bwipe XXUxMac
+ 
+   e! XXDosMac
+   w! Xtest
+   call assert_equal("dos\r\ndos\r\nmac\rmac\r\r\n", s:file2str('Xtest'))
+   bwipe XXDosMac
+ 
+   " try with 'fileformats' set to 'unix,mac'
+   set fileformats=unix,mac
+   e! XXUxDs
+   w! Xtest
+   call assert_equal("unix\nunix\ndos\r\ndos\r\n", s:file2str('Xtest'))
+   bwipe XXUxDs
+ 
+   e! XXUxDsMc
+   w! Xtest
+   call assert_equal("unix\nunix\ndos\r\ndos\r\nmac\rmac\r\n",
+ 	      \ s:file2str('Xtest'))
+   bwipe XXUxDsMc
+ 
+   e! XXDosMac
+   w! Xtest
+   call assert_equal("dos\r\ndos\r\nmac\rmac\r", s:file2str('Xtest'))
+   bwipe XXDosMac
+ 
+   e! XXEol
+   exe "normal ggO\<C-R>=&ffs\<CR>:\<C-R>=&ff\<CR>"
+   w! Xtest
+   call assert_equal("unix,mac:unix\nnoeol\n", s:file2str('Xtest'))
+   bwipe! XXEol
+ 
+   " try with 'fileformats' set to 'dos,mac'
+   set fileformats=dos,mac
+   e! XXUxDs
+   w! Xtest
+   call assert_equal("unix\r\nunix\r\ndos\r\ndos\r\n", s:file2str('Xtest'))
+   bwipe XXUxDs
+ 
+   e! XXUxMac
+   exe "normal ggO\<C-R>=&ffs\<CR>:\<C-R>=&ff\<CR>"
+   w! Xtest
+   call assert_equal("dos,mac:dos\r\nunix\r\nunix\r\nmac\rmac\r\r\n",
+ 	      \ s:file2str('Xtest'))
+   bwipe! XXUxMac
+ 
+   e! XXUxDsMc
+   w! Xtest
+   call assert_equal("unix\r\nunix\r\ndos\r\ndos\r\nmac\rmac\r\r\n",
+ 	      \ s:file2str('Xtest'))
+   bwipe XXUxDsMc
+ 
+   e! XXMacEol
+   exe "normal ggO\<C-R>=&ffs\<CR>:\<C-R>=&ff\<CR>"
+   w! Xtest
+   call assert_equal("dos,mac:mac\rmac\rmac\rnoeol\r", s:file2str('Xtest'))
+   bwipe! XXMacEol
+ 
+   " Test 4: try reading and writing with 'fileformats' set to three formats
+   set fileformats=unix,dos,mac
+   e! XXUxDsMc
+   w! Xtest
+   call assert_equal("unix\nunix\ndos\r\ndos\r\nmac\rmac\r\n",
+ 	      \ s:file2str('Xtest'))
+   bwipe XXUxDsMc
+ 
+   e! XXEol
+   exe "normal ggO\<C-R>=&ffs\<CR>:\<C-R>=&ff\<CR>"
+   w! Xtest
+   call assert_equal("unix,dos,mac:unix\nnoeol\n", s:file2str('Xtest'))
+   bwipe! XXEol
+ 
+   set fileformats=mac,dos,unix
+   e! XXUxDsMc
+   w! Xtest
+   call assert_equal("unix\nunix\ndos\r\ndos\r\nmac\rmac\r\n",
+ 	      \ s:file2str('Xtest'))
+   bwipe XXUxDsMc
+ 
+   e! XXEol
+   exe "normal ggO\<C-R>=&ffs\<CR>:\<C-R>=&ff\<CR>"
+   w! Xtest
+   call assert_equal("mac,dos,unix:mac\rnoeol\r", s:file2str('Xtest'))
+   bwipe! XXEol
+ 
+   " Test 5: try with 'binary' set
+   set fileformats=mac,unix,dos
+   set binary
+   e! XXUxDsMc
+   w! Xtest
+   call assert_equal("unix\nunix\ndos\r\ndos\r\nmac\rmac\r",
+ 	      \ s:file2str('Xtest'))
+   bwipe XXUxDsMc
+ 
+   set fileformats=mac
+   e! XXUxDsMc
+   w! Xtest
+   call assert_equal("unix\nunix\ndos\r\ndos\r\nmac\rmac\r",
+ 	      \ s:file2str('Xtest'))
+   bwipe XXUxDsMc
+ 
+   set fileformats=dos
+   e! XXUxDsMc
+   w! Xtest
+   call assert_equal("unix\nunix\ndos\r\ndos\r\nmac\rmac\r",
+ 	      \ s:file2str('Xtest'))
+   bwipe XXUxDsMc
+ 
+   e! XXUnix
+   w! Xtest
+   call assert_equal("unix\nunix\n", s:file2str('Xtest'))
+   bwipe! XXUnix
+ 
+   set nobinary ff& ffs&
+ 
+   " cleanup
+   only
+   %bwipe!
+   call delete('XXUnix')
+   call delete('XXDos')
+   call delete('XXMac')
+   call delete('XXEol')
+   call delete('XXUxDs')
+   call delete('XXUxMac')
+   call delete('XXDosMac')
+   call delete('XXMacEol')
+   call delete('XXUxDsMc')
+   call delete('Xtest')
+ endfunc
*** ../vim-8.1.1411/src/version.c	2019-05-27 22:01:36.871920997 +0200
--- src/version.c	2019-05-27 22:19:45.142527742 +0200
***************
*** 769,770 ****
--- 769,772 ----
  {   /* Add new patch number below this line */
+ /**/
+     1412,
  /**/

-- 
You have the right to remain silent. Anything you say will be
misquoted, then used against you.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///