summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-06-10 11:49:14 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2020-06-10 12:11:13 +0200
commitc5bafc3a190e12cec6099d963e15a832849ee996 (patch)
tree7dc705bc429aa53e0eda21d40f633f4b12e970e4 /scripts
parenta297c09da5ad355d53a8e8ea72655a06d15b7bc7 (diff)
downloadphp-git-c5bafc3a190e12cec6099d963e15a832849ee996.tar.gz
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).
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/dev/bless_tests.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/dev/bless_tests.php b/scripts/dev/bless_tests.php
index fbbfe505c9..e28efc9c0d 100755
--- a/scripts/dev/bless_tests.php
+++ b/scripts/dev/bless_tests.php
@@ -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(