diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-01-24 13:18:43 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-01-24 13:18:43 +0100 |
commit | 1695f99d08076d77ed3015f1edf09a668a4d449a (patch) | |
tree | c4b1ce5374c3dcee314d6c21610885d73da29f69 /src/testdir/test_fileformat.vim | |
parent | 9957a10d0f0c34d8083af6ed66e198e4796038e0 (diff) | |
download | vim-1695f99d08076d77ed3015f1edf09a668a4d449a.zip |
patch 8.0.0226: test for patch 8.0.0224 missing CR characters
Problem: The test for patch 8.0.0224 misses the CR characters and passes
even without the fix. (Christian Brabandt)
Solution: Use double quotes and \<CR>.
Diffstat (limited to 'src/testdir/test_fileformat.vim')
-rw-r--r-- | src/testdir/test_fileformat.vim | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/testdir/test_fileformat.vim b/src/testdir/test_fileformat.vim index 256a7d5b1..de505d3bd 100644 --- a/src/testdir/test_fileformat.vim +++ b/src/testdir/test_fileformat.vim @@ -17,15 +17,17 @@ func Test_fileformat_after_bw() endfunc func Test_fileformat_autocommand() - 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 - new Xfile - call assert_equal('dos', &l:ff) - call assert_equal('dos', &ffs) - " cleanup - let &ffs=ffs - au! BufReadPre Xfile - bw! + let filecnt = ["\<CR>", "foobar\<CR>", "eins\<CR>", "\<CR>", "zwei\<CR>", "drei", "vier", "fünf", ""] + let ffs = &ffs + call writefile(filecnt, 'Xfile', 'b') + au BufReadPre Xfile set ffs=dos ff=dos + new Xfile + call assert_equal('dos', &l:ff) + call assert_equal('dos', &ffs) + + " cleanup + call delete('Xfile') + let &ffs = ffs + au! BufReadPre Xfile + bw! endfunc |