To: vim_dev@googlegroups.com Subject: Patch 9.0.1120 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.1120 Problem: Tex filetype detection not sufficiently tested. Solution: Add more test cases for "tex" detection. (Jonas Strittmatter, closes #11765) Files: src/testdir/test_filetype.vim *** ../vim-9.0.1119/src/testdir/test_filetype.vim 2022-12-27 20:17:15.805022039 +0000 --- src/testdir/test_filetype.vim 2022-12-31 14:44:38.401503295 +0000 *************** *** 1653,1668 **** func Test_tex_file() filetype on ! " only tests one case, should do more let lines =<< trim END ! % This is a sentence. ! This is a sentence. END ! call writefile(lines, "Xfile.tex") split Xfile.tex ! call assert_equal('plaintex', &filetype) bwipe call delete('Xfile.tex') filetype off --- 1653,1696 ---- func Test_tex_file() filetype on ! call writefile(['%& pdflatex'], 'Xfile.tex') ! split Xfile.tex ! call assert_equal('tex', &filetype) ! bwipe ! ! call writefile(['\newcommand{\test}{some text}'], 'Xfile.tex') ! split Xfile.tex ! call assert_equal('tex', &filetype) ! bwipe ! ! " tex_flavor is unset ! call writefile(['%& plain'], 'Xfile.tex') ! split Xfile.tex ! call assert_equal('plaintex', &filetype) ! bwipe ! ! let g:tex_flavor = 'plain' ! call writefile(['just some text'], 'Xfile.tex') ! split Xfile.tex ! call assert_equal('plaintex', &filetype) ! bwipe ! let lines =<< trim END ! % This is a comment. ! \usemodule[translate] END ! call writefile(lines, 'Xfile.tex') split Xfile.tex ! call assert_equal('context', &filetype) ! bwipe ! ! let g:tex_flavor = 'context' ! call writefile(['just some text'], 'Xfile.tex') ! split Xfile.tex ! call assert_equal('context', &filetype) bwipe + unlet g:tex_flavor call delete('Xfile.tex') filetype off *** ../vim-9.0.1119/src/version.c 2022-12-31 14:01:20.830671637 +0000 --- src/version.c 2022-12-31 14:46:18.297469792 +0000 *************** *** 697,698 **** --- 697,700 ---- { /* Add new patch number below this line */ + /**/ + 1120, /**/ -- My Go, this amn keyboar oesn't have a . /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///