]> granicus.if.org Git - php/commitdiff
changes to run-tests.php:
authorNuno Lopes <nlopess@php.net>
Fri, 14 Sep 2007 15:28:03 +0000 (15:28 +0000)
committerNuno Lopes <nlopess@php.net>
Fri, 14 Sep 2007 15:28:03 +0000 (15:28 +0000)
- change %s to %a
- make %s = [^\r\n]+
- fix tests accordingly

ext/bz2/tests/005.phpt
ext/standard/tests/general_functions/phpcredits.phpt
ext/standard/tests/general_functions/phpinfo.phpt
ext/standard/tests/strings/sha1.phpt
ext/zlib/tests/005.phpt
ext/zlib/tests/006.phpt
run-tests.php

index 48323531ea8625033b9aa1014f953b4bae3034cc..fc2235d62786f4b06b66a1e11a7e0a2e6ab5cfc2 100644 (file)
@@ -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)
index 2a8acc9a87ed7fca77a250bcbf9cc4287aaa20db..cc1a308799479629c20a2b2a764374f6bcf9b320 100644 (file)
@@ -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)
index dab7f327c16ad41895af6940b740ab669adb3d2e..32125bfceb4a2037f0b5473a33398b3516d9d280 100644 (file)
@@ -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)
index ed8f47457a09a074d44a0fdbb3669e1694a8e191..68a8a080ca7dd5d3369dda3e76a93371de85cee6 100644 (file)
@@ -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
index 79834b2d347299e6c8d21cf3a326bd21e5830136..84fc3b5f10f65bcaed649f853f0bb2d8b3940b08 100644 (file)
@@ -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
index 1ddb563784f5948578c23318419a21d2ade90c70..6a4e0f4e6799d0114e31e78c31d24c6e0f681db4 100644 (file)
@@ -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
index f360af267cf524e250c2c81592366860ec50c01e..1f9bac15729b3e90549f3120e287d2218cdc45c8 100755 (executable)
@@ -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