forked from aniani/vim
patch 8.2.0262: fileformat test fails on MS-Windows
Problem: Fileformat test fails on MS-Windows. Solution: Set fileformat of buffer.
This commit is contained in:
@@ -281,10 +281,13 @@ endfunc
|
|||||||
func Test_fileformat_plusplus_read()
|
func Test_fileformat_plusplus_read()
|
||||||
new
|
new
|
||||||
call setline(1, ['one', 'two', 'three'])
|
call setline(1, ['one', 'two', 'three'])
|
||||||
|
set ff=unix
|
||||||
w ++ff=dos Xfile1
|
w ++ff=dos Xfile1
|
||||||
enew!
|
enew!
|
||||||
|
" A :read doesn't change the fileformat, but does apply to the read lines.
|
||||||
r ++fileformat=unix Xfile1
|
r ++fileformat=unix Xfile1
|
||||||
call assert_equal('unix', &fileformat)
|
call assert_equal('unix', &fileformat)
|
||||||
|
call assert_equal("three\r", getline('$'))
|
||||||
3r ++edit Xfile1
|
3r ++edit Xfile1
|
||||||
call assert_equal('dos', &fileformat)
|
call assert_equal('dos', &fileformat)
|
||||||
close!
|
close!
|
||||||
|
@@ -742,6 +742,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
262,
|
||||||
/**/
|
/**/
|
||||||
261,
|
261,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user