comparison src/testdir/test_fileformat.vim @ 19409:ba6afd154f91 v8.2.0262

patch 8.2.0262: fileformat test fails on MS-Windows Commit: https://github.com/vim/vim/commit/50434bd74c7708e3e2a47449b6a3a8d9fa069f71 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 16 14:55:22 2020 +0100 patch 8.2.0262: fileformat test fails on MS-Windows Problem: Fileformat test fails on MS-Windows. Solution: Set fileformat of buffer.
author Bram Moolenaar <Bram@vim.org>
date Sun, 16 Feb 2020 15:00:03 +0100
parents 2f4be7ca1b1b
children 85e8bee2e3e2
comparison
equal deleted inserted replaced
19408:e9a7a1c635d2 19409:ba6afd154f91
279 279
280 " Test for changing the fileformat using ++read 280 " Test for changing the fileformat using ++read
281 func Test_fileformat_plusplus_read() 281 func Test_fileformat_plusplus_read()
282 new 282 new
283 call setline(1, ['one', 'two', 'three']) 283 call setline(1, ['one', 'two', 'three'])
284 set ff=unix
284 w ++ff=dos Xfile1 285 w ++ff=dos Xfile1
285 enew! 286 enew!
287 " A :read doesn't change the fileformat, but does apply to the read lines.
286 r ++fileformat=unix Xfile1 288 r ++fileformat=unix Xfile1
287 call assert_equal('unix', &fileformat) 289 call assert_equal('unix', &fileformat)
290 call assert_equal("three\r", getline('$'))
288 3r ++edit Xfile1 291 3r ++edit Xfile1
289 call assert_equal('dos', &fileformat) 292 call assert_equal('dos', &fileformat)
290 close! 293 close!
291 call delete('Xfile1') 294 call delete('Xfile1')
292 set fileformat& 295 set fileformat&