diff src/testdir/test_fileformat.vim @ 31140:a52697bcffa6 v9.0.0904

patch 9.0.0904: various comment and indent flaws Commit: https://github.com/vim/vim/commit/88456cd3c49a3dd1fda17cf350daa9b8216b1aa6 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Nov 18 22:14:09 2022 +0000 patch 9.0.0904: various comment and indent flaws Problem: Various comment and indent flaws. Solution: Improve comments and indenting.
author Bram Moolenaar <Bram@vim.org>
date Fri, 18 Nov 2022 23:15:04 +0100
parents a7a9e8b9af89
children
line wrap: on
line diff
--- a/src/testdir/test_fileformat.vim
+++ b/src/testdir/test_fileformat.vim
@@ -76,7 +76,12 @@ func Test_fileformats()
   call s:concat_files('XXMac', 'XXEol', 'XXMacEol')
   call s:concat_files('XXUxDs', 'XXMac', 'XXUxDsMc')
 
-  new
+  " The :bwipe commands below cause us to get back to the current buffer.
+  " Avoid stray errors for various 'fileformat' values which may cause a
+  " modeline to be misinterpreted by wiping the buffer and editing a new one.
+  only!
+  bwipe!
+  enew
 
   " Test 1: try reading and writing with 'fileformats' empty
   set fileformats=