> Hi Bram!
>
> On Mo, 23 Jan 2017, Bram Moolenaar wrote:
>
> > + func Test_fileformat_autocommand()
> > + let filecnt=['', 'foobar', 'eins', '', 'zwei', 'drei', 'vier', 'fünf',
> > '']
>
> That looks wrong. The first five items should have an explicit CR '^M'
> inside it. Did this test actually fail before the patch?
Attached patch fixes it and also cleans up correctly by deleting the
newly written file Xfile
Best,
Christian
--
Sparsamkeit besteht im Auswählen, nicht im Konsum.
-- Edmund Burke
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
From e9920e950094ea7026adccdd24c7311323f9ed22 Mon Sep 17 00:00:00 2001
From: Christian Brabandt <[email protected]>
Date: Tue, 24 Jan 2017 08:46:17 +0100
Subject: [PATCH] Clean up test_fileformat correctly
Also write testfile with mixed CRLF/LF endings correctly.
---
src/testdir/test_fileformat.vim | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/testdir/test_fileformat.vim b/src/testdir/test_fileformat.vim
index 256a7d5b1..0fab73b56 100644
--- a/src/testdir/test_fileformat.vim
+++ b/src/testdir/test_fileformat.vim
@@ -17,7 +17,7 @@ func Test_fileformat_after_bw()
endfunc
func Test_fileformat_autocommand()
- let filecnt=['', 'foobar', 'eins', '', 'zwei', 'drei', 'vier', 'fünf', '']
+ let filecnt=['
', 'foobar
', 'eins
', '
', 'zwei
', 'drei', 'vier', 'fünf', '']
let ffs=&ffs
call writefile(filecnt, 'Xfile', 'b')
au BufReadPre Xfile set ffs=dos ff=dos
@@ -25,6 +25,7 @@ func Test_fileformat_autocommand()
call assert_equal('dos', &l:ff)
call assert_equal('dos', &ffs)
" cleanup
+ call delete('Xfile')
let &ffs=ffs
au! BufReadPre Xfile
bw!
--
2.11.0