diff options
author | Julien Voisin <jvoisin@google.com> | 2022-04-07 16:01:13 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-04-07 16:01:13 +0100 |
commit | 177847e67a495f80a15b6dfd0a3fcd151b44249e (patch) | |
tree | fb8f245fd0e3731575d360f79ed3eb275091789e | |
parent | 8c9796085071950f9a03ca0fe116608e4f86aac2 (diff) | |
download | vim-git-177847e67a495f80a15b6dfd0a3fcd151b44249e.tar.gz |
patch 8.2.4708: PHP test files are not recognizedv8.2.4708
Problem: PHP test files are not recognized.
Solution: Add the *.phpt pattern. (Julien Voisin, closes #10112)
-rw-r--r-- | runtime/filetype.vim | 7 | ||||
-rw-r--r-- | src/testdir/test_filetype.vim | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 9d63a7fe8..4aa5743da 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -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 diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index dc2dc5ae4..c8c159c44 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -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'], diff --git a/src/version.c b/src/version.c index bd63e9317..a7bfeceac 100644 --- a/src/version.c +++ b/src/version.c @@ -747,6 +747,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4708, +/**/ 4707, /**/ 4706, |