]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1517: filetype: autopkgtest files are not recognized v9.1.1517
authorJames McCoy <jamessan@jamessan.com>
Sun, 6 Jul 2025 15:55:01 +0000 (17:55 +0200)
committerChristian Brabandt <cb@256bit.org>
Sun, 6 Jul 2025 15:57:35 +0000 (17:57 +0200)
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>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index 55bb45162b776b8c1dcf63ec25b09a273b7a5086..00196f775de1b4ec1837a5db7584b601cbd82101 100644 (file)
@@ -690,11 +690,16 @@ au BufNewFile,BufRead *.dfy                       setf dafny
 " Dart
 au BufRead,BufNewfile *.dart,*.drt             setf dart
 
+" Debian autopkgtest
+au BufNewFile,BufRead */debian/tests/control   setf autopkgtest
+
 " Debian Control
 au BufNewFile,BufRead */{debian,DEBIAN}/control                setf debcontrol
 au BufNewFile,BufRead control
        \  if getline(1) =~ '^Source:\|^Package:'
        \|   setf debcontrol
+       \| elseif getline(1) =~ '^Tests:\|^Test-Command:'
+       \|   setf autopkgtest
        \| endif
 
 " Debian Copyright
index 286132b8390a0f3161b859dedd47f8f48035dc09..91fdc49f8cfe778c8c60ca3000c18abd867ed492 100644 (file)
@@ -125,6 +125,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     autohotkey: ['file.ahk'],
     autoit: ['file.au3'],
     automake: ['GNUmakefile.am', 'makefile.am', 'Makefile.am'],
+    autopkgtest: ['/debian/tests/control', 'any/debian/tests/control'],
     ave: ['file.ave'],
     awk: ['file.awk', 'file.gawk'],
     b: ['file.mch', 'file.ref', 'file.imp'],
index 6b9d934508b8486a1f5b9988cba7304c2cc343cb..6bd3f67eebdfbb08161aac1ae88839502af08a87 100644 (file)
@@ -719,6 +719,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1517,
 /**/
     1516,
 /**/