Skip to content

Commit 1695f99

Browse files
committed
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>.
1 parent 9957a10 commit 1695f99

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

src/testdir/test_fileformat.vim

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,17 @@ func Test_fileformat_after_bw()
1717
endfunc
1818

1919
func Test_fileformat_autocommand()
20-
let filecnt=['', 'foobar', 'eins', '', 'zwei', 'drei', 'vier', 'fünf', '']
21-
let ffs=&ffs
22-
call writefile(filecnt, 'Xfile', 'b')
23-
au BufReadPre Xfile set ffs=dos ff=dos
24-
new Xfile
25-
call assert_equal('dos', &l:ff)
26-
call assert_equal('dos', &ffs)
27-
" cleanup
28-
let &ffs=ffs
29-
au! BufReadPre Xfile
30-
bw!
20+
let filecnt = ["\<CR>", "foobar\<CR>", "eins\<CR>", "\<CR>", "zwei\<CR>", "drei", "vier", "fünf", ""]
21+
let ffs = &ffs
22+
call writefile(filecnt, 'Xfile', 'b')
23+
au BufReadPre Xfile set ffs=dos ff=dos
24+
new Xfile
25+
call assert_equal('dos', &l:ff)
26+
call assert_equal('dos', &ffs)
27+
28+
" cleanup
29+
call delete('Xfile')
30+
let &ffs = ffs
31+
au! BufReadPre Xfile
32+
bw!
3133
endfunc

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
226,
767769
/**/
768770
225,
769771
/**/

0 commit comments

Comments
 (0)