Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions scripts/dev/bless_tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ function normalizeOutput(string $out): string {
'Resource ID#%d used as offset, casting to integer (%d)',
$out);
$out = preg_replace('/string\(\d+\) "([^"]*%d)/', 'string(%d) "$1', $out);
// Inside of strings, replace absolute paths that have been truncated with
// any string. These tend to contain homedirs with usernames, not good.
$out = preg_replace("/'\\/.*\.\\.\\.'/", "'%s'", $out);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this regex should be aligned with the one for the error messages: (\/|[A-Z]:\\\\)\S+ (i.e. support for Windows and no whitespace).

$out = preg_replace("/'file:\/\\/.*\.\\.\\.'/", "'%s'", $out);
$out = str_replace("\0", '%0', $out);
return $out;
}
Expand Down
Loading