patch 9.1.1517: filetype: autopkgtest files are not recognized

Problem:  filetype: autopkgtest files are not recognized
Solution: detect */debian/tests/control files as autopkgtest filetype
          (James McCoy)

Autopkgtest is a Debian tool for testing installed versions of packages
when other, related packages are updated.

Reference:
- https://www.debian.org/doc/debian-policy/autopkgtest.txt

related: #17679

Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
James McCoy
2025-07-06 17:55:01 +02:00
committed by Christian Brabandt
parent 08e5b128b8
commit 5bcc492649
3 changed files with 8 additions and 0 deletions

View File

@ -690,11 +690,16 @@ au BufNewFile,BufRead *.dfy setf dafny
" Dart " Dart
au BufRead,BufNewfile *.dart,*.drt setf dart au BufRead,BufNewfile *.dart,*.drt setf dart
" Debian autopkgtest
au BufNewFile,BufRead */debian/tests/control setf autopkgtest
" Debian Control " Debian Control
au BufNewFile,BufRead */{debian,DEBIAN}/control setf debcontrol au BufNewFile,BufRead */{debian,DEBIAN}/control setf debcontrol
au BufNewFile,BufRead control au BufNewFile,BufRead control
\ if getline(1) =~ '^Source:\|^Package:' \ if getline(1) =~ '^Source:\|^Package:'
\| setf debcontrol \| setf debcontrol
\| elseif getline(1) =~ '^Tests:\|^Test-Command:'
\| setf autopkgtest
\| endif \| endif
" Debian Copyright " Debian Copyright

View File

@ -125,6 +125,7 @@ def s:GetFilenameChecks(): dict<list<string>>
autohotkey: ['file.ahk'], autohotkey: ['file.ahk'],
autoit: ['file.au3'], autoit: ['file.au3'],
automake: ['GNUmakefile.am', 'makefile.am', 'Makefile.am'], automake: ['GNUmakefile.am', 'makefile.am', 'Makefile.am'],
autopkgtest: ['/debian/tests/control', 'any/debian/tests/control'],
ave: ['file.ave'], ave: ['file.ave'],
awk: ['file.awk', 'file.gawk'], awk: ['file.awk', 'file.gawk'],
b: ['file.mch', 'file.ref', 'file.imp'], b: ['file.mch', 'file.ref', 'file.imp'],

View File

@ -719,6 +719,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1517,
/**/ /**/
1516, 1516,
/**/ /**/