nlopess Fri Sep 14 15:28:04 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src run-tests.php
/php-src/ext/bz2/tests 005.phpt
/php-src/ext/standard/tests/general_functions phpcredits.phpt
phpinfo.phpt
/php-src/ext/standard/tests/strings sha1.phpt
/php-src/ext/zlib/tests 005.phpt 006.phpt
Log:
changes to run-tests.php:
- change %s to %a
- make %s = [^\r\n]+
- fix tests accordingly
http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.226.2.37.2.34&r2=1.226.2.37.2.35&diff_format=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.226.2.37.2.34
php-src/run-tests.php:1.226.2.37.2.35
--- php-src/run-tests.php:1.226.2.37.2.34 Tue Jul 31 21:29:21 2007
+++ php-src/run-tests.php Fri Sep 14 15:28:03 2007
@@ -23,7 +23,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: run-tests.php,v 1.226.2.37.2.34 2007/07/31 21:29:21 jani Exp $ */
+/* $Id: run-tests.php,v 1.226.2.37.2.35 2007/09/14 15:28:03 nlopess Exp $ */
/* Sanity check to ensure that pcre extension needed by this script is
available.
* In the event it is not, print a nice error message indicating that this
script will
@@ -399,7 +399,7 @@
$html_output = is_resource($html_file);
break;
case '--version':
- echo '$Revision: 1.226.2.37.2.34
$'."\n";
+ echo '$Revision: 1.226.2.37.2.35
$'."\n";
exit(1);
case 'u':
@@ -1486,14 +1486,15 @@
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
http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/tests/005.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
Index: php-src/ext/bz2/tests/005.phpt
diff -u php-src/ext/bz2/tests/005.phpt:1.1.2.1
php-src/ext/bz2/tests/005.phpt:1.1.2.2
--- php-src/ext/bz2/tests/005.phpt:1.1.2.1 Mon Jun 26 22:17:18 2006
+++ php-src/ext/bz2/tests/005.phpt Fri Sep 14 15:28:03 2007
@@ -37,10 +37,10 @@
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)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/phpcredits.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
Index: php-src/ext/standard/tests/general_functions/phpcredits.phpt
diff -u php-src/ext/standard/tests/general_functions/phpcredits.phpt:1.1.2.1
php-src/ext/standard/tests/general_functions/phpcredits.phpt:1.1.2.2
--- php-src/ext/standard/tests/general_functions/phpcredits.phpt:1.1.2.1
Fri Nov 24 20:18:54 2006
+++ php-src/ext/standard/tests/general_functions/phpcredits.phpt Fri Sep
14 15:28:03 2007
@@ -17,28 +17,28 @@
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 @@
PHP Credits
PHP Group
-%s
+%a
bool(true)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/phpinfo.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
Index: php-src/ext/standard/tests/general_functions/phpinfo.phpt
diff -u php-src/ext/standard/tests/general_functions/phpinfo.phpt:1.1.2.1
php-src/ext/standard/tests/general_functions/phpinfo.phpt:1.1.2.2
--- php-src/ext/standard/tests/general_functions/phpinfo.phpt:1.1.2.1 Fri Nov
24 20:18:54 2006
+++ php-src/ext/standard/tests/general_functions/phpinfo.phpt Fri Sep 14
15:28:03 2007
@@ -24,6 +24,7 @@
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 Stream Socket Transports => %s
Registered Stream Filters => %s
-%s
+%a
_______________________________________________________________________
@@ -43,22 +44,22 @@
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 @@
phpinfo()
PHP License
-%s
+%a
bool(true)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sha1.phpt?r1=1.2.6.1&r2=1.2.6.2&diff_format=u
Index: php-src/ext/standard/tests/strings/sha1.phpt
diff -u php-src/ext/standard/tests/strings/sha1.phpt:1.2.6.1
php-src/ext/standard/tests/strings/sha1.phpt:1.2.6.2
--- php-src/ext/standard/tests/strings/sha1.phpt:1.2.6.1 Thu Nov 16
13:01:23 2006
+++ php-src/ext/standard/tests/strings/sha1.phpt Fri Sep 14 15:28:03 2007
@@ -44,8 +44,8 @@
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
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/005.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/zlib/tests/005.phpt
diff -u php-src/ext/zlib/tests/005.phpt:1.1.2.2
php-src/ext/zlib/tests/005.phpt:1.1.2.3
--- php-src/ext/zlib/tests/005.phpt:1.1.2.2 Thu Aug 24 11:30:35 2006
+++ php-src/ext/zlib/tests/005.phpt Fri Sep 14 15:28:03 2007
@@ -33,18 +33,18 @@
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
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/006.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
Index: php-src/ext/zlib/tests/006.phpt
diff -u php-src/ext/zlib/tests/006.phpt:1.1.2.1
php-src/ext/zlib/tests/006.phpt:1.1.2.2
--- php-src/ext/zlib/tests/006.phpt:1.1.2.1 Mon Jun 26 23:35:22 2006
+++ php-src/ext/zlib/tests/006.phpt Fri Sep 14 15:28:03 2007
@@ -40,11 +40,11 @@
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
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php