]> granicus.if.org Git - vim/commitdiff
patch 8.2.0262: fileformat test fails on MS-Windows v8.2.0262
authorBram Moolenaar <Bram@vim.org>
Sun, 16 Feb 2020 13:55:22 +0000 (14:55 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 16 Feb 2020 13:55:22 +0000 (14:55 +0100)
Problem:    Fileformat test fails on MS-Windows.
Solution:   Set fileformat of buffer.

src/testdir/test_fileformat.vim
src/version.c

index efc5a0dd17bbb4633c592f184bd3ec3dee04221b..9f90debd7ffd67c351f37684f5cc656351557ac9 100644 (file)
@@ -281,10 +281,13 @@ endfunc
 func Test_fileformat_plusplus_read()
   new
   call setline(1, ['one', 'two', 'three'])
+  set ff=unix
   w ++ff=dos Xfile1
   enew!
+  " A :read doesn't change the fileformat, but does apply to the read lines.
   r ++fileformat=unix Xfile1
   call assert_equal('unix', &fileformat)
+  call assert_equal("three\r", getline('$'))
   3r ++edit Xfile1
   call assert_equal('dos', &fileformat)
   close!
index ba8343dd9ce8ce5566c5c63d7e47ceb73c1cd01c..95d4cd84388e26b2d0c9d0a35f9152dd2c829d87 100644 (file)
@@ -742,6 +742,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    262,
 /**/
     261,
 /**/