Skip to content
Permalink
Browse files

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>.
  • Loading branch information...
brammool committed Jan 24, 2017
1 parent 9957a10 commit 1695f99d08076d77ed3015f1edf09a668a4d449a
Showing with 15 additions and 11 deletions.
  1. +13 −11 src/testdir/test_fileformat.vim
  2. +2 −0 src/version.c
@@ -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
@@ -764,6 +764,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
226,
/**/
225,
/**/

0 comments on commit 1695f99

Please sign in to comment.
You can’t perform that action at this time.