Mercurial > vim
changeset 28365:da2f2f8fd66e v8.2.4708
patch 8.2.4708: PHP test files are not recognized
Commit: https://github.com/vim/vim/commit/177847e67a495f80a15b6dfd0a3fcd151b44249e
Author: Julien Voisin <jvoisin@google.com>
Date: Thu Apr 7 16:01:13 2022 +0100
patch 8.2.4708: PHP test files are not recognized
Problem: PHP test files are not recognized.
Solution: Add the *.phpt pattern. (Julien Voisin, closes https://github.com/vim/vim/issues/10112)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 07 Apr 2022 17:15:03 +0200 |
parents | 93767b22f1d5 |
children | 832a949ab26d |
files | runtime/filetype.vim src/testdir/test_filetype.vim src/version.c |
diffstat | 3 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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'],