Skip to content

Commit c5bafc3

Browse files
committed
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).
1 parent a297c09 commit c5bafc3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/dev/bless_tests.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ function getFiles(array $dirsOrFiles): \Iterator {
4949
}
5050

5151
function normalizeOutput(string $out): string {
52-
$out = preg_replace('/in \/.+ on line \d+$/m', 'in %s on line %d', $out);
53-
$out = preg_replace('/in \/.+:\d+$/m', 'in %s:%d', $out);
54-
$out = preg_replace('/^#(\d+) \/.+\(\d+\):/m', '#$1 %s(%d):', $out);
52+
$out = preg_replace('/in (\/|[A-Z]:\\\\).+ on line \d+$/m', 'in %s on line %d', $out);
53+
$out = preg_replace('/in (\/|[A-Z]:\\\\).+:\d+$/m', 'in %s:%d', $out);
54+
$out = preg_replace('/^#(\d+) (\/|[A-Z]:\\\\).+\(\d+\):/m', '#$1 %s(%d):', $out);
5555
$out = preg_replace('/Resource id #\d+/', 'Resource id #%d', $out);
5656
$out = preg_replace('/resource\(\d+\) of type/', 'resource(%d) of type', $out);
5757
$out = preg_replace(

0 commit comments

Comments
 (0)