From fb7ffac69fe4a32abfb4abfe5cf36213da17904d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 16 Apr 2024 09:33:33 +0800 Subject: vim-patch:9.1.0326: filetype: some requirements files are not recognized (#28360) Problem: filetype: some requirements files are not recognized Solution: Detect '*-requirements.txt', 'constraints.txt', 'requirements.in', 'requirements/*.txt' and 'requires/*.txt' as requirements filetype, include pip compiler, include requirements filetype and syntax plugin (Wu, Zhenyu, @raimon49) closes: vim/vim#14379 https://github.com/vim/vim/commit/f9f5424d3e75bbdb35aa48fa6f9241d9479b35e8 Co-authored-by: Wu, Zhenyu Co-authored-by: raimon --- test/old/testdir/test_compiler.vim | 4 ++-- test/old/testdir/test_filetype.vim | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/old/testdir/test_compiler.vim b/test/old/testdir/test_compiler.vim index 11cfd7f47f..69420b4b7f 100644 --- a/test/old/testdir/test_compiler.vim +++ b/test/old/testdir/test_compiler.vim @@ -62,10 +62,10 @@ func Test_compiler_completion() call assert_match('^"compiler ' .. clist .. '$', @:) call feedkeys(":compiler p\\\"\", 'tx') - call assert_match('"compiler pandoc pbx perl\( p[a-z]\+\)\+ pylint pyunit', @:) + call assert_match('"compiler pandoc pbx perl\( p[a-z_]\+\)\+ pylint pyunit', @:) call feedkeys(":compiler! p\\\"\", 'tx') - call assert_match('"compiler! pandoc pbx perl\( p[a-z]\+\)\+ pylint pyunit', @:) + call assert_match('"compiler! pandoc pbx perl\( p[a-z_]\+\)\+ pylint pyunit', @:) endfunc func Test_compiler_error() diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim index b07759ae9e..917d3bfb2e 100644 --- a/test/old/testdir/test_filetype.vim +++ b/test/old/testdir/test_filetype.vim @@ -595,7 +595,7 @@ func s:GetFilenameChecks() abort \ 'readline': ['.inputrc', 'inputrc'], \ 'rego': ['file.rego'], \ 'remind': ['.reminders', 'file.remind', 'file.rem', '.reminders-file'], - \ 'requirements': ['file.pip', 'requirements.txt'], + \ 'requirements': ['file.pip', 'requirements.txt', 'dev-requirements.txt', 'constraints.txt', 'requirements.in', 'requirements/dev.txt', 'requires/dev.txt'], \ 'rescript': ['file.res', 'file.resi'], \ 'resolv': ['resolv.conf'], \ 'reva': ['file.frt'], -- cgit