]> granicus.if.org Git - vim/commitdiff
patch 8.2.4708: PHP test files are not recognized v8.2.4708
authorJulien Voisin <jvoisin@google.com>
Thu, 7 Apr 2022 15:01:13 +0000 (16:01 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 7 Apr 2022 15:01:13 +0000 (16:01 +0100)
Problem:    PHP test files are not recognized.
Solution:   Add the *.phpt pattern. (Julien Voisin, closes #10112)

runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index 9d63a7fe8995f90d7db975f7afe50f0d7c27a35d..4aa5743daeba196579af6e9d5685ac70101781ac 100644 (file)
@@ -1352,9 +1352,10 @@ au BufNewFile,BufRead *.pm
 au BufNewFile,BufRead *.pod                    setf pod
 
 " Php, php3, php4, etc.
-" Also Phtml (was used for PHP 2 in the past)
-" Also .ctp for Cake template file
-au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp      setf php
+" Also Phtml (was used for PHP 2 in the past).
+" Also .ctp for Cake template file.
+" Also .phpt for php tests.
+au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp,*.phpt       setf php
 
 " PHP config
 au BufNewFile,BufRead php.ini-*                        setf dosini
index dc2dc5ae4e254b0be1977e6fc06aa6f1c9c81f60..c8c159c44e6e74030489454e20dba0bf4ac4e3e5 100644 (file)
@@ -396,7 +396,7 @@ let s:filename_checks = {
     \ 'perl': ['file.plx', 'file.al', 'file.psgi', 'gitolite.rc', '.gitolite.rc', 'example.gitolite.rc'],
     \ 'pf': ['pf.conf'],
     \ 'pfmain': ['main.cf'],
-    \ 'php': ['file.php', 'file.php9', 'file.phtml', 'file.ctp'],
+    \ 'php': ['file.php', 'file.php9', 'file.phtml', 'file.ctp', 'file.phpt'],
     \ 'lpc': ['file.lpc', 'file.ulpc'],
     \ 'pike': ['file.pike', 'file.pmod'],
     \ 'cmod': ['file.cmod'],
index bd63e9317da7f6be14e9d01a9ab221712edb460f..a7bfeceaca222d1864af581bf73441dbe450b6be 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4708,
 /**/
     4707,
 /**/