]> granicus.if.org Git - php/commitdiff
Improve bless_tests
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 12 Jul 2019 08:34:49 +0000 (10:34 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 12 Jul 2019 10:54:01 +0000 (12:54 +0200)
If a string var_dump contains a wildcard, also make the length a
wildcard.

scripts/dev/bless_tests.php

index 19c24bf188a91cce6c006a68ab56ec9c50702ca7..190ebfb86a6ac5a4fcc120c58c0928e40bf567d0 100755 (executable)
@@ -53,6 +53,7 @@ function normalizeOutput(string $out): string {
     $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);
+    $out = preg_replace('/string\(\d+\) "([^"]*%d)/', 'string(%d) "$1', $out);
     return $out;
 }