[PHP-CVS] Re: cvs: php-src / run-tests.php
Hi Zoe, it seems that the indention is wrong. The patch contains spaces instead of tabs. David Zoe Slattery schrieb: zoe Tue Mar 3 10:52:56 2009 UTC Modified files: /php-src run-tests.php Log: Added %r section http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.390&r2=1.391&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.390 php-src/run-tests.php:1.391 --- php-src/run-tests.php:1.390 Mon Jan 5 11:14:37 2009 +++ php-src/run-tests.php Tue Mar 3 10:52:56 2009 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.390 2009/01/05 11:14:37 tony2001 Exp $ */ +/* $Id: run-tests.php,v 1.391 2009/03/03 10:52:56 zoe 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 @@ -617,7 +617,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.390 $' . "\n"; + echo '$Revision: 1.391 $' . "\n"; exit(1); default: @@ -1737,7 +1737,32 @@ $wanted_re = preg_replace('/\r\n/', "\n", $wanted); if (isset($section_text['EXPECTF'])) { - $wanted_re = preg_quote($wanted_re, '/'); + +// do preg_quote, but miss out any %r delimited sections +$temp = ""; +$r = "%r"; +$startOffset = 0; +$length = strlen($wanted_re); +while($startOffset < $length) { + $start = strpos($wanted_re, $r, $startOffset); + if ($start !== false) { +// we have found a start tag +$end = strpos($wanted_re, $r, $start+2); +if ($end === false) { + // unbalanced tag, ignore it. + $end = $start = $length; +} + } else { +// no more %r sections +$start = $end = $length; + } + // quote a non re portion of the string + $temp = $temp . preg_quote(substr($wanted_re, $startOffset, ($start - $startOffset)), '/'); + // add the re unquoted. + $temp = $temp . substr($wanted_re, $start+2, ($end - $start-2)); + $startOffset = $end + 2; +} +$wanted_re = $temp; $wanted_re = str_replace( array('%binary_string_optional%'), version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' : 'binary string', -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS
iliaa Tue Mar 3 23:43:29 2009 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS Log: BFN http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.505&r2=1.2027.2.547.2.965.2.506&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.505 php-src/NEWS:1.2027.2.547.2.965.2.506 --- php-src/NEWS:1.2027.2.547.2.965.2.505 Tue Mar 3 01:42:21 2009 +++ php-src/NEWSTue Mar 3 23:43:29 2009 @@ -5,6 +5,8 @@ - Re-enabled phar for big-endian systems after fixing problems. (Greg) +- Fixed bug #47549 (get_defined_constants() return array with broken + array categories). (Ilia) - Fixed Bug #47443 (metaphone('scratch') returns wrong result). (Felipe) - Fixed bug #47438 (mysql_fetch_field ignores zero offset). (Johannes) - Fixed bug #47398 (PDO_Firebird doesn't implements quoter correctly). (Felipe) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard string.c /ext/standard/tests/strings bug47546.phpt
On 03.03.2009 14:50, Kalle Sommer Nielsen wrote: > kalle Tue Mar 3 11:50:33 2009 UTC > > Added files: (Branch: PHP_5_2) > /php-src/ext/standard/tests/strings bug47546.phpt > > Modified files: > /php-src NEWS > /php-src/ext/standard string.c > Log: > MFH: Fixed bug #47546 (Default value for limit parameter in explode is 0, > not -1) Is this supposed to break 4 explode() tests? -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard string.c /ext/standard/tests/strings bug47546.phpt
kalle Tue Mar 3 11:50:33 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings bug47546.phpt Modified files: /php-srcNEWS /php-src/ext/standard string.c Log: MFH: Fixed bug #47546 (Default value for limit parameter in explode is 0, not -1) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1432&r2=1.2027.2.547.2.1433&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1432 php-src/NEWS:1.2027.2.547.2.1433 --- php-src/NEWS:1.2027.2.547.2.1432Sun Mar 1 17:36:09 2009 +++ php-src/NEWSTue Mar 3 11:50:32 2009 @@ -3,6 +3,8 @@ ?? ??? 2009, PHP 5.2.10 - Fixed memory corruptions while reading properties of zip files. (Ilia) +- Fixed bug #47546 (Default value for limit parameter in explode is 0, + not -1). (Kalle) - Fixed bug #47435 (FILTER_FLAG_NO_PRIV_RANGE does not work with ipv6 addresses in the filter extension). (Ilia) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.81&r2=1.445.2.14.2.82&diff_format=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.445.2.14.2.81 php-src/ext/standard/string.c:1.445.2.14.2.82 --- php-src/ext/standard/string.c:1.445.2.14.2.81 Sat Feb 14 07:00:24 2009 +++ php-src/ext/standard/string.c Tue Mar 3 11:50:32 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.445.2.14.2.81 2009/02/14 07:00:24 moriyoshi Exp $ */ +/* $Id: string.c,v 1.445.2.14.2.82 2009/03/03 11:50:32 kalle Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -1042,7 +1042,7 @@ if (limit == 0 || limit == 1) { add_index_stringl(return_value, 0, Z_STRVAL_PP(str), Z_STRLEN_PP(str), 1); - } else if (limit < 0 && argc == 3) { + } else if (limit < -1 && argc == 3) { php_explode_negative_limit(*delim, *str, return_value, limit); } else { php_explode(*delim, *str, return_value, limit); http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/bug47546.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/bug47546.phpt +++ php-src/ext/standard/tests/strings/bug47546.phpt --TEST-- Bug #47546 (Default value for limit parameter in explode is 0, not -1) --FILE-- --EXPECT-- Array ( [0] => one [1] => two [2] => three [3] => four ) Array ( [0] => one [1] => two [2] => three [3] => four ) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard string.c /ext/standard/tests/strings bug47546.phpt
kalle Tue Mar 3 11:47:31 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings bug47546.phpt Modified files: /php-src/ext/standard string.c Log: MFH: Fixed bug #47546 (Default value for limit parameter in explode is 0, not -1) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.69.2.42&r2=1.445.2.14.2.69.2.43&diff_format=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.445.2.14.2.69.2.42 php-src/ext/standard/string.c:1.445.2.14.2.69.2.43 --- php-src/ext/standard/string.c:1.445.2.14.2.69.2.42 Sat Feb 14 06:59:55 2009 +++ php-src/ext/standard/string.c Tue Mar 3 11:47:31 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.445.2.14.2.69.2.42 2009/02/14 06:59:55 moriyoshi Exp $ */ +/* $Id: string.c,v 1.445.2.14.2.69.2.43 2009/03/03 11:47:31 kalle Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -1027,7 +1027,7 @@ if (limit == 0 || limit == 1) { add_index_stringl(return_value, 0, Z_STRVAL_PP(str), Z_STRLEN_PP(str), 1); - } else if (limit < 0 && argc == 3) { + } else if (limit < -1 && argc == 3) { php_explode_negative_limit(*delim, *str, return_value, limit); } else { php_explode(*delim, *str, return_value, limit); http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/bug47546.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/bug47546.phpt +++ php-src/ext/standard/tests/strings/bug47546.phpt --TEST-- Bug #47546 (Default value for limit parameter in explode is 0, not -1) --FILE-- --EXPECT-- Array ( [0] => one [1] => two [2] => three [3] => four ) Array ( [0] => one [1] => two [2] => three [3] => four ) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard string.c /ext/standard/tests/strings bug47546.phpt
kalle Tue Mar 3 11:46:20 2009 UTC Added files: /php-src/ext/standard/tests/strings bug47546.phpt Modified files: /php-src/ext/standard string.c Log: Fixed bug #47546 (Default value for limit parameter in explode is 0, not -1) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.692&r2=1.693&diff_format=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.692 php-src/ext/standard/string.c:1.693 --- php-src/ext/standard/string.c:1.692 Sat Feb 14 06:59:36 2009 +++ php-src/ext/standard/string.c Tue Mar 3 11:46:19 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.692 2009/02/14 06:59:36 moriyoshi Exp $ */ +/* $Id: string.c,v 1.693 2009/03/03 11:46:19 kalle Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -1311,7 +1311,7 @@ } else { add_index_stringl(return_value, 0, (char *)str, str_len, 1); } - } else if (limit < 0 && argc == 3) { + } else if (limit < -1 && argc == 3) { if ( str_type == IS_UNICODE ) { php_u_explode_negative_limit((UChar *)delim, delim_len, (UChar *)str, str_len, return_value, limit); } else { http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/bug47546.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/bug47546.phpt +++ php-src/ext/standard/tests/strings/bug47546.phpt --TEST-- Bug #47546 (Default value for limit parameter in explode is 0, not -1) --FILE-- --EXPECT-- Array ( [0] => one [1] => two [2] => three [3] => four ) Array ( [0] => one [1] => two [2] => three [3] => four ) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / run-tests.php
zoe Tue Mar 3 10:54:16 2009 UTC Modified files: (Branch: PHP_5_2) /php-srcrun-tests.php Log: Added %r section http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.226.2.37.2.57&r2=1.226.2.37.2.58&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.226.2.37.2.57 php-src/run-tests.php:1.226.2.37.2.58 --- php-src/run-tests.php:1.226.2.37.2.57 Wed Dec 31 17:37:21 2008 +++ php-src/run-tests.php Tue Mar 3 10:54:16 2009 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.226.2.37.2.57 2008/12/31 17:37:21 zoe Exp $ */ +/* $Id: run-tests.php,v 1.226.2.37.2.58 2009/03/03 10:54:16 zoe 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 @@ -617,7 +617,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.226.2.37.2.57 $' . "\n"; + echo '$Revision: 1.226.2.37.2.58 $' . "\n"; exit(1); default: @@ -1738,7 +1738,32 @@ $wanted_re = preg_replace('/\r\n/', "\n", $wanted); if (isset($section_text['EXPECTF'])) { - $wanted_re = preg_quote($wanted_re, '/'); + +// do preg_quote, but miss out any %r delimited sections +$temp = ""; +$r = "%r"; +$startOffset = 0; +$length = strlen($wanted_re); +while($startOffset < $length) { + $start = strpos($wanted_re, $r, $startOffset); + if ($start !== false) { +// we have found a start tag +$end = strpos($wanted_re, $r, $start+2); +if ($end === false) { + // unbalanced tag, ignore it. + $end = $start = $length; +} + } else { +// no more %r sections +$start = $end = $length; + } + // quote a non re portion of the string + $temp = $temp . preg_quote(substr($wanted_re, $startOffset, ($start - $startOffset)), '/'); + // add the re unquoted. + $temp = $temp . substr($wanted_re, $start+2, ($end - $start-2)); + $startOffset = $end + 2; +} +$wanted_re = $temp; $wanted_re = str_replace( array('%binary_string_optional%'), version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' : 'binary string', -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / run-tests.php
zoe Tue Mar 3 10:53:44 2009 UTC Modified files: (Branch: PHP_5_3) /php-srcrun-tests.php Log: Added %r section http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.226.2.37.2.35.2.61&r2=1.226.2.37.2.35.2.62&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.226.2.37.2.35.2.61 php-src/run-tests.php:1.226.2.37.2.35.2.62 --- php-src/run-tests.php:1.226.2.37.2.35.2.61 Mon Jan 5 11:14:43 2009 +++ php-src/run-tests.php Tue Mar 3 10:53:44 2009 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.226.2.37.2.35.2.61 2009/01/05 11:14:43 tony2001 Exp $ */ +/* $Id: run-tests.php,v 1.226.2.37.2.35.2.62 2009/03/03 10:53:44 zoe 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 @@ -617,7 +617,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.226.2.37.2.35.2.61 $' . "\n"; + echo '$Revision: 1.226.2.37.2.35.2.62 $' . "\n"; exit(1); default: @@ -1737,7 +1737,33 @@ $wanted_re = preg_replace('/\r\n/', "\n", $wanted); if (isset($section_text['EXPECTF'])) { - $wanted_re = preg_quote($wanted_re, '/'); + +// do preg_quote, but miss out any %r delimited sections +$temp = ""; +$r = "%r"; +$startOffset = 0; +$length = strlen($wanted_re); +while($startOffset < $length) { + $start = strpos($wanted_re, $r, $startOffset); + if ($start !== false) { +// we have found a start tag +$end = strpos($wanted_re, $r, $start+2); +if ($end === false) { + // unbalanced tag, ignore it. + $end = $start = $length; +} + } else { +// no more %r sections +$start = $end = $length; + } + // quote a non re portion of the string + $temp = $temp . preg_quote(substr($wanted_re, $startOffset, ($start - $startOffset)), '/'); + // add the re unquoted. + $temp = $temp . substr($wanted_re, $start+2, ($end - $start-2)); + $startOffset = $end + 2; +} +$wanted_re = $temp; + $wanted_re = str_replace( array('%binary_string_optional%'), version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' : 'binary string', -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
zoe Tue Mar 3 10:52:56 2009 UTC Modified files: /php-srcrun-tests.php Log: Added %r section http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.390&r2=1.391&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.390 php-src/run-tests.php:1.391 --- php-src/run-tests.php:1.390 Mon Jan 5 11:14:37 2009 +++ php-src/run-tests.php Tue Mar 3 10:52:56 2009 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.390 2009/01/05 11:14:37 tony2001 Exp $ */ +/* $Id: run-tests.php,v 1.391 2009/03/03 10:52:56 zoe 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 @@ -617,7 +617,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.390 $' . "\n"; + echo '$Revision: 1.391 $' . "\n"; exit(1); default: @@ -1737,7 +1737,32 @@ $wanted_re = preg_replace('/\r\n/', "\n", $wanted); if (isset($section_text['EXPECTF'])) { - $wanted_re = preg_quote($wanted_re, '/'); + +// do preg_quote, but miss out any %r delimited sections +$temp = ""; +$r = "%r"; +$startOffset = 0; +$length = strlen($wanted_re); +while($startOffset < $length) { + $start = strpos($wanted_re, $r, $startOffset); + if ($start !== false) { +// we have found a start tag +$end = strpos($wanted_re, $r, $start+2); +if ($end === false) { + // unbalanced tag, ignore it. + $end = $start = $length; +} + } else { +// no more %r sections +$start = $end = $length; + } + // quote a non re portion of the string + $temp = $temp . preg_quote(substr($wanted_re, $startOffset, ($start - $startOffset)), '/'); + // add the re unquoted. + $temp = $temp . substr($wanted_re, $start+2, ($end - $start-2)); + $startOffset = $end + 2; +} +$wanted_re = $temp; $wanted_re = str_replace( array('%binary_string_optional%'), version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' : 'binary string', -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/class_object get_class_methods_variation_002.phpt get_class_variation_002.phpt
zoe Tue Mar 3 09:59:36 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/class_object get_class_methods_variation_002.phpt get_class_variation_002.phpt Log: removing UEXPECT http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/get_class_methods_variation_002.phpt?r1=1.1.4.2&r2=1.1.4.3&diff_format=u Index: php-src/ext/standard/tests/class_object/get_class_methods_variation_002.phpt diff -u php-src/ext/standard/tests/class_object/get_class_methods_variation_002.phpt:1.1.4.2 php-src/ext/standard/tests/class_object/get_class_methods_variation_002.phpt:1.1.4.3 --- php-src/ext/standard/tests/class_object/get_class_methods_variation_002.phpt:1.1.4.2 Thu Mar 6 11:02:37 2008 +++ php-src/ext/standard/tests/class_object/get_class_methods_variation_002.phpt Tue Mar 3 09:59:36 2009 @@ -24,11 +24,4 @@ [0]=> string(8) "MyMeThOd" } -Done ---UEXPECTF-- -*** Testing get_class_methods() : usage variations *** -array(1) { - [0]=> - unicode(8) "MyMeThOd" -} Done \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/get_class_variation_002.phpt?r1=1.1.4.2&r2=1.1.4.3&diff_format=u Index: php-src/ext/standard/tests/class_object/get_class_variation_002.phpt diff -u php-src/ext/standard/tests/class_object/get_class_variation_002.phpt:1.1.4.2 php-src/ext/standard/tests/class_object/get_class_variation_002.phpt:1.1.4.3 --- php-src/ext/standard/tests/class_object/get_class_variation_002.phpt:1.1.4.2 Thu Mar 6 11:02:37 2008 +++ php-src/ext/standard/tests/class_object/get_class_variation_002.phpt Tue Mar 3 09:59:36 2009 @@ -15,7 +15,4 @@ ?> --EXPECTF-- string(19) "caseSensitivityTest" -Done ---UEXPECTF-- -unicode(19) "caseSensitivityTest" Done \ No newline at end of file -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php