mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Also support absolute Windows filenames
The output normalization of bless_tests.php only detected absolute Unix filenames; we extend this for absolute Windows filenames, regardless of the platform we're running on (tests may have been run on Windows, but bless_tests.php may be run from WSL or a Linux VM, for instance).
This commit is contained in:
parent
a297c09da5
commit
c5bafc3a19
1 changed files with 3 additions and 3 deletions
|
@ -49,9 +49,9 @@ function getFiles(array $dirsOrFiles): \Iterator {
|
|||
}
|
||||
|
||||
function normalizeOutput(string $out): string {
|
||||
$out = preg_replace('/in \/.+ on line \d+$/m', 'in %s on line %d', $out);
|
||||
$out = preg_replace('/in \/.+:\d+$/m', 'in %s:%d', $out);
|
||||
$out = preg_replace('/^#(\d+) \/.+\(\d+\):/m', '#$1 %s(%d):', $out);
|
||||
$out = preg_replace('/in (\/|[A-Z]:\\\\).+ on line \d+$/m', 'in %s on line %d', $out);
|
||||
$out = preg_replace('/in (\/|[A-Z]:\\\\).+:\d+$/m', 'in %s:%d', $out);
|
||||
$out = preg_replace('/^#(\d+) (\/|[A-Z]:\\\\).+\(\d+\):/m', '#$1 %s(%d):', $out);
|
||||
$out = preg_replace('/Resource id #\d+/', 'Resource id #%d', $out);
|
||||
$out = preg_replace('/resource\(\d+\) of type/', 'resource(%d) of type', $out);
|
||||
$out = preg_replace(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue