com php-src: Handle exception patterns in bless_tests.php : scripts/dev/bless_tests.php
| From: | Nikita Popov | Date: | Mon, 18 Feb 2019 10:03:38 +0000 |
| Subject: | com php-src: Handle exception patterns in bless_tests.php : scripts/dev/bless_tests.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-104684@lists.php.net to get a copy of this message | ||
Commit: cc0e01a2fad81ae87b5b2240ddd776e508e4c59a
Author: Nikita Popov <nikita.ppv@gmail.com> Mon, 18 Feb 2019 09:56:39 +0100
Parents: 5b15908ed7d1765c1776b40ffc58092044aa1332
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=cc0e01a2fad81ae87b5b2240ddd776e508e4c59a
Log:
Handle exception patterns in bless_tests.php
Changed paths:
M scripts/dev/bless_tests.php
Diff:
diff --git a/scripts/dev/bless_tests.php b/scripts/dev/bless_tests.php
index 121a011..67c4def 100644
--- a/scripts/dev/bless_tests.php
+++ b/scripts/dev/bless_tests.php
@@ -36,7 +36,9 @@ foreach ($it as $file) {
}
function normalizeOutput(string $out): string {
- $out = preg_replace('/in \/.+ on line \d+/', 'in %s on line %d', $out);
+ $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('/Resource id #\d+/', 'Resource id #%d', $out);
return $out;
}