diff options
-rw-r--r-- | ext/bz2/tests/005.phpt | 4 | ||||
-rw-r--r-- | ext/standard/tests/general_functions/phpcredits.phpt | 18 | ||||
-rw-r--r-- | ext/standard/tests/general_functions/phpinfo.phpt | 15 | ||||
-rw-r--r-- | ext/standard/tests/strings/sha1.phpt | 4 | ||||
-rw-r--r-- | ext/zlib/tests/005.phpt | 12 | ||||
-rw-r--r-- | ext/zlib/tests/006.phpt | 10 | ||||
-rwxr-xr-x | run-tests.php | 17 |
7 files changed, 41 insertions, 39 deletions
diff --git a/ext/bz2/tests/005.phpt b/ext/bz2/tests/005.phpt index 48323531ea..fc2235d627 100644 --- a/ext/bz2/tests/005.phpt +++ b/ext/bz2/tests/005.phpt @@ -37,10 +37,10 @@ var_dump(bzdecompress($data2)); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: Wrong parameter count for bzcompress() in %s on line %d NULL -string(%d) "BZ%s" +string(%d) "BZ%a" int(-2) int(-2) int(-2) diff --git a/ext/standard/tests/general_functions/phpcredits.phpt b/ext/standard/tests/general_functions/phpcredits.phpt index 2a8acc9a87..cc1a308799 100644 --- a/ext/standard/tests/general_functions/phpcredits.phpt +++ b/ext/standard/tests/general_functions/phpcredits.phpt @@ -17,28 +17,28 @@ var_dump(phpcredits(CREDITS_GROUP)); PHP Credits PHP Group -%s +%a Language Design & Concept -%s +%a %wPHP %d Authors%w -%s +%a %wSAPI Modules%w -%s +%a %wModule Authors%w -%s +%a %wPHP Documentation%w -%s +%a PHP Quality Assurance Team -%s +%a PHP Website Team -%s +%a bool(true) Warning: phpcredits() expects parameter 1 to be long, array given in %sphpcredits.php on line 4 @@ -50,5 +50,5 @@ bool(true) PHP Credits PHP Group -%s +%a bool(true) diff --git a/ext/standard/tests/general_functions/phpinfo.phpt b/ext/standard/tests/general_functions/phpinfo.phpt index dab7f327c1..32125bfceb 100644 --- a/ext/standard/tests/general_functions/phpinfo.phpt +++ b/ext/standard/tests/general_functions/phpinfo.phpt @@ -24,6 +24,7 @@ Configure Command => %s Server API => Command Line Interface Virtual Directory Support => %s Configuration File (php.ini) Path => %s +Loaded Configuration File => %s PHP API => %d PHP Extension => %d Zend Extension => %d @@ -35,7 +36,7 @@ Registered PHP Streams => %s Registered Stream Socket Transports => %s Registered Stream Filters => %s -%s +%a _______________________________________________________________________ @@ -43,22 +44,22 @@ Configuration PHP Core -%s +%a Additional Modules -%s +%a Environment -%s +%a PHP Variables -%s +%a PHP License -%s +%a bool(true) -- @@ -71,5 +72,5 @@ bool(true) phpinfo() PHP License -%s +%a bool(true) diff --git a/ext/standard/tests/strings/sha1.phpt b/ext/standard/tests/strings/sha1.phpt index ed8f47457a..68a8a080ca 100644 --- a/ext/standard/tests/strings/sha1.phpt +++ b/ext/standard/tests/strings/sha1.phpt @@ -44,8 +44,8 @@ bool(true) string(40) "da39a3ee5e6b4b0d3255bfef95601890afd80709" string(40) "da39a3ee5e6b4b0d3255bfef95601890afd80709" bool(true) -string(20) "%s" -string(20) "%s" +string(20) "%a" +string(20) "%a" Warning: sha1_file(%ssha1.dat): failed to open stream: No such file or directory in %s on line %d Done diff --git a/ext/zlib/tests/005.phpt b/ext/zlib/tests/005.phpt index 79834b2d34..84fc3b5f10 100644 --- a/ext/zlib/tests/005.phpt +++ b/ext/zlib/tests/005.phpt @@ -33,18 +33,18 @@ var_dump(gzuncompress($data2)); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: gzcompress() expects at least 1 parameter, 0 given in %s on line %d NULL Warning: gzcompress(): compression level (1000) must be within -1..9 in %s on line %d bool(false) -string(%d) "%s" -string(%d) "%s" -string(%d) "%s" -string(%d) "%s" -string(%d) "%s" +string(%d) "%a" +string(%d) "%a" +string(%d) "%a" +string(%d) "%a" +string(%d) "%a" Warning: gzuncompress() expects at least 1 parameter, 0 given in %s on line %d NULL diff --git a/ext/zlib/tests/006.phpt b/ext/zlib/tests/006.phpt index 1ddb563784..6a4e0f4e67 100644 --- a/ext/zlib/tests/006.phpt +++ b/ext/zlib/tests/006.phpt @@ -40,11 +40,11 @@ NULL Warning: gzdeflate(): compression level (1000) must be within -1..9 in %s on line %d bool(false) -string(%d) "%s" -string(%d) "%s" -string(%d) "%s" -string(%d) "%s" -string(%d) "%s" +string(%d) "%a" +string(%d) "%a" +string(%d) "%a" +string(%d) "%a" +string(%d) "%a" Warning: gzinflate() expects at least 1 parameter, 0 given in %s on line %d NULL diff --git a/run-tests.php b/run-tests.php index f360af267c..1f9bac1572 100755 --- a/run-tests.php +++ b/run-tests.php @@ -1486,14 +1486,15 @@ COMMAND $cmd if (isset($section_text['EXPECTF'])) { $wanted_re = preg_quote($wanted_re, '/'); // Stick to basics - $wanted_re = str_replace("%e", '\\' . DIRECTORY_SEPARATOR, $wanted_re); - $wanted_re = str_replace("%s", ".+?", $wanted_re); //not greedy - $wanted_re = str_replace("%w", "\s*", $wanted_re); - $wanted_re = str_replace("%i", "[+\-]?[0-9]+", $wanted_re); - $wanted_re = str_replace("%d", "[0-9]+", $wanted_re); - $wanted_re = str_replace("%x", "[0-9a-fA-F]+", $wanted_re); - $wanted_re = str_replace("%f", "[+\-]?\.?[0-9]+\.?[0-9]*(E-?[0-9]+)?", $wanted_re); - $wanted_re = str_replace("%c", ".", $wanted_re); + $wanted_re = str_replace('%e', '\\' . DIRECTORY_SEPARATOR, $wanted_re); + $wanted_re = str_replace('%s', '[^\r\n]+', $wanted_re); + $wanted_re = str_replace('%a', '.+', $wanted_re); + $wanted_re = str_replace('%w', '\s*', $wanted_re); + $wanted_re = str_replace('%i', '[+-]?\d+', $wanted_re); + $wanted_re = str_replace('%d', '\d+', $wanted_re); + $wanted_re = str_replace('%x', '[0-9a-fA-F]+', $wanted_re); + $wanted_re = str_replace('%f', '[+-]?\.?\d+\.?\d*(?:E-?\d+)?', $wanted_re); + $wanted_re = str_replace('%c', '.', $wanted_re); // %f allows two points "-.0.0" but that is the best *simple* expression } /* DEBUG YOUR REGEX HERE |