[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2008-01-05 Thread changelog
changelog   Sun Jan  6 01:31:30 2008 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2918r2=1.2919diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2918 php-src/ChangeLog:1.2919
--- php-src/ChangeLog:1.2918Sat Jan  5 01:31:28 2008
+++ php-src/ChangeLog   Sun Jan  6 01:31:30 2008
@@ -1,3 +1,17 @@
+2008-01-05  Greg Beaver  [EMAIL PROTECTED]
+
+* run-tests.php
+  run-tests.php
+  run-tests.php:
+  remove potential preg warnings if --EXPECTHEADERS-- is combined with
+  --EXPECTF-- or --EXPECTRE--
+
+* run-tests.php
+  run-tests.php
+  run-tests.php:
+  implement --FILE_EXTERNAL-- section for using an external file as 
--FILE--,
+  use CGI for --EXPECTHEADERS--, fix --POST_RAW--
+
 2008-01-04  Ulf Wendel  [EMAIL PROTECTED]
 
 * (PHP_5_3)



[PHP-CVS] cvs: CVSROOT / avail

2008-01-05 Thread Marcus Boerger
helly   Sat Jan  5 10:56:16 2008 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - Upgrade Greg
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1341r2=1.1342diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1341 CVSROOT/avail:1.1342
--- CVSROOT/avail:1.1341Sat Dec 29 23:32:23 2007
+++ CVSROOT/avail   Sat Jan  5 10:56:16 2008
@@ -17,7 +17,7 @@
 # The PHP Developers have full access to the full source trees for
 # PHP, as well as the documentation.
 
-avail|dharmap,kraghuba,stevseea,colder,lwe,auroraeosrose,mike,rolland,cawa,msisolak,alan_k,rrichards,tal,mfischer,fmk,hirokawa,jah,eschmid,dbeu,sebastian,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,jani,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,cardinal,coar,jflemer,raphael,danda,rbb,mboeren,dougm,edink,alexwaugh,bernd,zak,sesser,yohgaki,imajes,markonen,dickmeiss,helly,sander,jan,kir,aaron,jwoolley,pbannister,rvenkat,dali,rodif_bl,hyanantha,witten,georg,msopacua,mpdoremus,fujimoto,iliaa,chregu,azzit,gschlossnagle,andrey,dan,moriyoshi,dviner,bfrance,flex,iwakiri,john,harrie,pollita,ianh,k.schroeder,dcowgill,jerenkrantz,jay,ddhill,jorton,thetaphi,abies,vincent,goba,dmitry,pajoye,shie,rafi,magnus,tony2001,johannes,dbs,skoduru,nrathna,jesus,gopalv,bjor!
 
i,nlopess,wrowe,shire,zoe,scottmac,t2man,dsp,davidw,ab5602,nicholsr,lsmith|phpfi,php3,php-src,pecl,non-pecl,spl,phpdoc,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,phpdoc-fa_IR,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-id,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-ca,phpdoc-no
+avail|dharmap,kraghuba,stevseea,colder,lwe,auroraeosrose,mike,rolland,cawa,msisolak,alan_k,rrichards,tal,mfischer,fmk,hirokawa,jah,eschmid,dbeu,sebastian,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,jani,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,cardinal,coar,jflemer,raphael,danda,rbb,mboeren,dougm,edink,alexwaugh,bernd,zak,sesser,yohgaki,imajes,markonen,dickmeiss,helly,sander,jan,kir,aaron,jwoolley,pbannister,rvenkat,dali,rodif_bl,hyanantha,witten,georg,msopacua,mpdoremus,fujimoto,iliaa,chregu,azzit,gschlossnagle,andrey,dan,moriyoshi,dviner,bfrance,flex,iwakiri,john,harrie,pollita,ianh,k.schroeder,dcowgill,jerenkrantz,jay,ddhill,jorton,thetaphi,abies,vincent,goba,dmitry,pajoye,shie,rafi,magnus,tony2001,johannes,dbs,skoduru,nrathna,jesus,gopalv,bjor!
 
i,nlopess,wrowe,shire,zoe,scottmac,t2man,dsp,davidw,ab5602,nicholsr,lsmith,cellog|phpfi,php3,php-src,pecl,non-pecl,spl,phpdoc,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,phpdoc-fa_IR,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-id,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-ca,phpdoc-no
 
 # fastcgi implementation for IIS
 avail|shane,wez,edink|fastcgi-isapi
@@ -259,7 +259,6 @@
 avail|mike|pecl/win32ps
 avail|traufeisen,jandrade|pecl/gnupg,phpdoc/en/reference/gnupg
 avail|mikl|pecl/memcache,pecl/wbxml,pecl/ocal,pecl/pam
-avail|cellog|phpdoc
 avail|ohill|pecl/stem
 avail|gwang|pecl/litespeed
 avail|jsjohnst|pecl/flitetts

-- 
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

2008-01-05 Thread Greg Beaver
cellog  Sat Jan  5 21:05:14 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcrun-tests.php 
  Log:
  implement --FILE_EXTERNAL-- section for using an external file as --FILE--, 
use CGI for --EXPECTHEADERS--, fix --POST_RAW--
  
http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.226.2.37.2.41r2=1.226.2.37.2.42diff_format=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.226.2.37.2.41 
php-src/run-tests.php:1.226.2.37.2.42
--- php-src/run-tests.php:1.226.2.37.2.41   Tue Jan  1 06:15:48 2008
+++ php-src/run-tests.php   Sat Jan  5 21:05:14 2008
@@ -24,7 +24,7 @@
+--+
  */
 
-/* $Id: run-tests.php,v 1.226.2.37.2.41 2008/01/01 06:15:48 sebastian Exp $ */
+/* $Id: run-tests.php,v 1.226.2.37.2.42 2008/01/05 21:05:14 cellog 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
@@ -403,7 +403,7 @@
$html_output = is_resource($html_file);
break;
case '--version':
-   echo '$Revision: 1.226.2.37.2.41 
$'.\n;
+   echo '$Revision: 1.226.2.37.2.42 
$'.\n;
exit(1);
 
case 'u':
@@ -1004,7 +1004,7 @@
if (preg_match('/^--([_A-Z]+)--/', $line, $r)) {
$section = $r[1];
$section_text[$section] = '';
-   $secfile = $section == 'FILE' || $section == 'FILEEOF';
+   $secfile = $section == 'FILE' || $section == 'FILEEOF' 
|| $section == 'FILE_EXTERNAL';
$secdone = false;
continue;
}
@@ -1030,7 +1030,7 @@
$borked = false;
}
} else {
-   if (@count($section_text['FILE']) + 
@count($section_text['FILEEOF']) != 1) {
+   if (@count($section_text['FILE']) + 
@count($section_text['FILEEOF']) + @count($section_text['FILE_EXTERNAL']) != 1) 
{
$bork_info = missing section --FILE--;
$borked = true;
}
@@ -1038,6 +1038,17 @@
$section_text['FILE'] = preg_replace(/[\r\n]+$/, '', 
$section_text['FILEEOF']);
unset($section_text['FILEEOF']);
}
+   if (@count($section_text['FILE_EXTERNAL']) == 1) {
+   // don't allow tests to retrieve files from anywhere 
but this subdirectory
+   $section_text['FILE_EXTERNAL'] = dirname($file) . '/' . 
trim(str_replace('..', '', $section_text['FILE_EXTERNAL']));
+   if (@file_exists($section_text['FILE_EXTERNAL'])) {
+   $section_text['FILE'] = 
file_get_contents($section_text['FILE_EXTERNAL']);
+   unset($section_text['FILE_EXTERNAL']);
+   } else {
+   $bork_info = could not load --FILE_EXTERNAL-- 
 . dirname($file) . '/' . trim($section_text['FILE_EXTERNAL']);
+   $borked = true;
+   }
+   }
if ((@count($section_text['EXPECT']) + 
@count($section_text['EXPECTF']) + @count($section_text['EXPECTREGEX'])) != 1) {
$bork_info = missing section --EXPECT--, --EXPECTF-- 
or --EXPECTREGEX--;
$borked = true;
@@ -1063,7 +1074,7 @@
$tested = trim($section_text['TEST']);
 
/* For GET/POST tests, check if cgi sapi is available and if it is, use 
it. */
-   if (!empty($section_text['GET']) || !empty($section_text['POST']) || 
!empty($section_text['POST_RAW']) || !empty($section_text['COOKIE'])) {
+   if (!empty($section_text['GET']) || !empty($section_text['POST']) || 
!empty($section_text['POST_RAW']) || !empty($section_text['COOKIE']) || 
!empty($section_text['EXPECTHEADERS'])) {
if (isset($php_cgi)) {
$old_php = $php;
$php = $php_cgi .' -C ';
@@ -1333,12 +1344,15 @@
$raw_lines = explode(\n, $post);
 
$request = '';
+   $started = false;
foreach ($raw_lines as $line) {
if (empty($env['CONTENT_TYPE'])  
preg_match('/^Content-Type:(.*)/i', $line, $res)) {
$env['CONTENT_TYPE'] = trim(str_replace(\r, 
'', $res[1]));
continue;
}
-   $request .= $line . \n;
+   if ($started) $request .= \n;
+   $started = true;
+   $request .= $line;
 

[PHP-CVS] cvs: php-src(PHP_5_3) / run-tests.php

2008-01-05 Thread Greg Beaver
cellog  Sat Jan  5 21:05:06 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcrun-tests.php 
  Log:
  implement --FILE_EXTERNAL-- section for using an external file as --FILE--, 
use CGI for --EXPECTHEADERS--, fix --POST_RAW--
  
http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.226.2.37.2.35.2.10r2=1.226.2.37.2.35.2.11diff_format=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.226.2.37.2.35.2.10 
php-src/run-tests.php:1.226.2.37.2.35.2.11
--- php-src/run-tests.php:1.226.2.37.2.35.2.10  Tue Jan  1 06:15:40 2008
+++ php-src/run-tests.php   Sat Jan  5 21:05:06 2008
@@ -24,7 +24,7 @@
+--+
  */
 
-/* $Id: run-tests.php,v 1.226.2.37.2.35.2.10 2008/01/01 06:15:40 sebastian Exp 
$ */
+/* $Id: run-tests.php,v 1.226.2.37.2.35.2.11 2008/01/05 21:05:06 cellog 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
@@ -408,7 +408,7 @@
$html_output = is_resource($html_file);
break;
case '--version':
-   echo '$Revision: 1.226.2.37.2.35.2.10 
$'.\n;
+   echo '$Revision: 1.226.2.37.2.35.2.11 
$'.\n;
exit(1);
 
case 'u':
@@ -1034,7 +1034,7 @@
if (preg_match('/^--([_A-Z]+)--/', $line, $r)) {
$section = $r[1];
$section_text[$section] = '';
-   $secfile = $section == 'FILE' || $section == 'FILEEOF';
+   $secfile = $section == 'FILE' || $section == 'FILEEOF' 
|| $section == 'FILE_EXTERNAL';
$secdone = false;
continue;
}
@@ -1060,7 +1060,7 @@
$borked = false;
}
} else {
-   if (@count($section_text['FILE']) + 
@count($section_text['FILEEOF']) != 1) {
+   if (@count($section_text['FILE']) + 
@count($section_text['FILEEOF']) + @count($section_text['FILE_EXTERNAL']) != 1) 
{
$bork_info = missing section --FILE--;
$borked = true;
}
@@ -1068,6 +1068,17 @@
$section_text['FILE'] = preg_replace(/[\r\n]+$/, '', 
$section_text['FILEEOF']);
unset($section_text['FILEEOF']);
}
+   if (@count($section_text['FILE_EXTERNAL']) == 1) {
+   // don't allow tests to retrieve files from anywhere 
but this subdirectory
+   $section_text['FILE_EXTERNAL'] = dirname($file) . '/' . 
trim(str_replace('..', '', $section_text['FILE_EXTERNAL']));
+   if (@file_exists($section_text['FILE_EXTERNAL'])) {
+   $section_text['FILE'] = 
file_get_contents($section_text['FILE_EXTERNAL']);
+   unset($section_text['FILE_EXTERNAL']);
+   } else {
+   $bork_info = could not load --FILE_EXTERNAL-- 
 . dirname($file) . '/' . trim($section_text['FILE_EXTERNAL']);
+   $borked = true;
+   }
+   }
if ((@count($section_text['EXPECT']) + 
@count($section_text['EXPECTF']) + @count($section_text['EXPECTREGEX'])) != 1) {
$bork_info = missing section --EXPECT--, --EXPECTF-- 
or --EXPECTREGEX--;
$borked = true;
@@ -1093,7 +1104,7 @@
$tested = trim($section_text['TEST']);
 
/* For GET/POST tests, check if cgi sapi is available and if it is, use 
it. */
-   if (!empty($section_text['GET']) || !empty($section_text['POST']) || 
!empty($section_text['POST_RAW']) || !empty($section_text['COOKIE'])) {
+   if (!empty($section_text['GET']) || !empty($section_text['POST']) || 
!empty($section_text['POST_RAW']) || !empty($section_text['COOKIE']) || 
!empty($section_text['EXPECTHEADERS'])) {
if (isset($php_cgi)) {
$old_php = $php;
$php = $php_cgi .' -C ';
@@ -1355,12 +1366,15 @@
$raw_lines = explode(\n, $post);
 
$request = '';
+   $started = false;
foreach ($raw_lines as $line) {
if (empty($env['CONTENT_TYPE'])  
preg_match('/^Content-Type:(.*)/i', $line, $res)) {
$env['CONTENT_TYPE'] = trim(str_replace(\r, 
'', $res[1]));
continue;
}
-   $request .= $line . \n;
+   if ($started) $request .= \n;
+   $started = true;
+ 

[PHP-CVS] cvs: php-src / run-tests.php

2008-01-05 Thread Greg Beaver
cellog  Sat Jan  5 21:04:55 2008 UTC

  Modified files:  
/php-srcrun-tests.php 
  Log:
  implement --FILE_EXTERNAL-- section for using an external file as --FILE--, 
use CGI for --EXPECTHEADERS--, fix --POST_RAW--
  
http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.337r2=1.338diff_format=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.337 php-src/run-tests.php:1.338
--- php-src/run-tests.php:1.337 Tue Jan  1 06:22:15 2008
+++ php-src/run-tests.php   Sat Jan  5 21:04:55 2008
@@ -24,7 +24,7 @@
+--+
  */
 
-/* $Id: run-tests.php,v 1.337 2008/01/01 06:22:15 sebastian Exp $ */
+/* $Id: run-tests.php,v 1.338 2008/01/05 21:04:55 cellog 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
@@ -415,7 +415,7 @@
$html_output = is_resource($html_file);
break;
case '--version':
-   echo '$Revision: 1.337 $'.\n;
+   echo '$Revision: 1.338 $'.\n;
exit(1);
default:
echo Illegal switch specified!\n;
@@ -1056,7 +1056,7 @@
if (preg_match('/^--([_A-Z]+)--/', $line, $r)) {
$section = $r[1];
$section_text[$section] = '';
-   $secfile = $section == 'FILE' || $section == 'FILEEOF';
+   $secfile = $section == 'FILE' || $section == 'FILEEOF' 
|| $section == 'FILE_EXTERNAL';
$secdone = false;
continue;
}
@@ -1082,7 +1082,7 @@
$borked = false;
}
} else {
-   if (@count($section_text['FILE']) + 
@count($section_text['FILEEOF']) != 1) {
+   if (@count($section_text['FILE']) + 
@count($section_text['FILEEOF']) + @count($section_text['FILE_EXTERNAL']) != 1) 
{
$bork_info = missing section --FILE--;
$borked = true;
}
@@ -1090,6 +1090,17 @@
$section_text['FILE'] = preg_replace(/[\r\n]+$/, '', 
$section_text['FILEEOF']);
unset($section_text['FILEEOF']);
}
+   if (@count($section_text['FILE_EXTERNAL']) == 1) {
+   // don't allow tests to retrieve files from anywhere 
but this subdirectory
+   $section_text['FILE_EXTERNAL'] = dirname($file) . '/' . 
trim(str_replace('..', '', $section_text['FILE_EXTERNAL']));
+   if (@file_exists($section_text['FILE_EXTERNAL'])) {
+   $section_text['FILE'] = 
file_get_contents($section_text['FILE_EXTERNAL']);
+   unset($section_text['FILE_EXTERNAL']);
+   } else {
+   $bork_info = could not load --FILE_EXTERNAL-- 
 . dirname($file) . '/' . trim($section_text['FILE_EXTERNAL']);
+   $borked = true;
+   }
+   }
if ((@count($section_text['EXPECT']) + 
@count($section_text['EXPECTF']) + @count($section_text['EXPECTREGEX'])) != 1) {
$bork_info = missing section --EXPECT--, --EXPECTF-- 
or --EXPECTREGEX--;
$borked = true;
@@ -1120,7 +1131,7 @@
$tested = trim($section_text['TEST']);
 
/* For GET/POST tests, check if cgi sapi is available and if it is, use 
it. */
-   if (!empty($section_text['GET']) || !empty($section_text['POST']) || 
!empty($section_text['POST_RAW']) || !empty($section_text['COOKIE'])) {
+   if (!empty($section_text['GET']) || !empty($section_text['POST']) || 
!empty($section_text['POST_RAW']) || !empty($section_text['COOKIE']) || 
!empty($section_text['EXPECTHEADERS'])) {
if (isset($php_cgi)) {
$old_php = $php;
$php = $php_cgi .' -C ';
@@ -1418,12 +1429,15 @@
$raw_lines = explode(\n, $post);
 
$request = '';
+   $started = false;
foreach ($raw_lines as $line) {
if (empty($env['CONTENT_TYPE'])  
preg_match('/^Content-Type:(.*)/i', $line, $res)) {
$env['CONTENT_TYPE'] = trim(str_replace(\r, 
'', $res[1]));
continue;
}
-   $request .= $line . \n;
+   if ($started) $request .= \n;
+   $started = true;
+   $request .= $line;
}
 

[PHP-CVS] cvs: php-src(PHP_5_3) / run-tests.php

2008-01-05 Thread Greg Beaver
cellog  Sat Jan  5 21:39:53 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcrun-tests.php 
  Log:
  remove potential preg warnings if --EXPECTHEADERS-- is combined with 
--EXPECTF-- or --EXPECTRE--
  
http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.226.2.37.2.35.2.11r2=1.226.2.37.2.35.2.12diff_format=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.226.2.37.2.35.2.11 
php-src/run-tests.php:1.226.2.37.2.35.2.12
--- php-src/run-tests.php:1.226.2.37.2.35.2.11  Sat Jan  5 21:05:06 2008
+++ php-src/run-tests.php   Sat Jan  5 21:39:53 2008
@@ -24,7 +24,7 @@
+--+
  */
 
-/* $Id: run-tests.php,v 1.226.2.37.2.35.2.11 2008/01/05 21:05:06 cellog Exp $ 
*/
+/* $Id: run-tests.php,v 1.226.2.37.2.35.2.12 2008/01/05 21:39:53 cellog 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
@@ -408,7 +408,7 @@
$html_output = is_resource($html_file);
break;
case '--version':
-   echo '$Revision: 1.226.2.37.2.35.2.11 
$'.\n;
+   echo '$Revision: 1.226.2.37.2.35.2.12 
$'.\n;
exit(1);
 
case 'u':
@@ -1600,7 +1600,7 @@
$wanted = $wanted_headers . \n--HEADERS--\n . $wanted;
$output = $output_headers . \n--HEADERS--\n . $output;
if (isset($wanted_re)) {
-   $wanted_re = $wanted_headers . \n--HEADERS--\n . 
$wanted_re;
+   $wanted_re = preg_quote($wanted_headers . 
\n--HEADERS--\n, '/') . $wanted_re;
}
}
 

-- 
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

2008-01-05 Thread Greg Beaver
cellog  Sat Jan  5 21:39:39 2008 UTC

  Modified files:  
/php-srcrun-tests.php 
  Log:
  remove potential preg warnings if --EXPECTHEADERS-- is combined with 
--EXPECTF-- or --EXPECTRE--
  
http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.338r2=1.339diff_format=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.338 php-src/run-tests.php:1.339
--- php-src/run-tests.php:1.338 Sat Jan  5 21:04:55 2008
+++ php-src/run-tests.php   Sat Jan  5 21:39:39 2008
@@ -24,7 +24,7 @@
+--+
  */
 
-/* $Id: run-tests.php,v 1.338 2008/01/05 21:04:55 cellog Exp $ */
+/* $Id: run-tests.php,v 1.339 2008/01/05 21:39:39 cellog 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
@@ -415,7 +415,7 @@
$html_output = is_resource($html_file);
break;
case '--version':
-   echo '$Revision: 1.338 $'.\n;
+   echo '$Revision: 1.339 $'.\n;
exit(1);
default:
echo Illegal switch specified!\n;
@@ -1667,7 +1667,7 @@
$wanted = $wanted_headers . \n--HEADERS--\n . $wanted;
$output = $output_headers . \n--HEADERS--\n . $output;
if (isset($wanted_re)) {
-   $wanted_re = $wanted_headers . \n--HEADERS--\n . 
$wanted_re;
+   $wanted_re = preg_quote($wanted_headers . 
\n--HEADERS--\n, '/') . $wanted_re;
}
}
 

-- 
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

2008-01-05 Thread Greg Beaver
cellog  Sat Jan  5 21:39:47 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcrun-tests.php 
  Log:
  remove potential preg warnings if --EXPECTHEADERS-- is combined with 
--EXPECTF-- or --EXPECTRE--
  
http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.226.2.37.2.42r2=1.226.2.37.2.43diff_format=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.226.2.37.2.42 
php-src/run-tests.php:1.226.2.37.2.43
--- php-src/run-tests.php:1.226.2.37.2.42   Sat Jan  5 21:05:14 2008
+++ php-src/run-tests.php   Sat Jan  5 21:39:47 2008
@@ -24,7 +24,7 @@
+--+
  */
 
-/* $Id: run-tests.php,v 1.226.2.37.2.42 2008/01/05 21:05:14 cellog Exp $ */
+/* $Id: run-tests.php,v 1.226.2.37.2.43 2008/01/05 21:39:47 cellog 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
@@ -403,7 +403,7 @@
$html_output = is_resource($html_file);
break;
case '--version':
-   echo '$Revision: 1.226.2.37.2.42 
$'.\n;
+   echo '$Revision: 1.226.2.37.2.43 
$'.\n;
exit(1);
 
case 'u':
@@ -1579,7 +1579,7 @@
$wanted = $wanted_headers . \n--HEADERS--\n . $wanted;
$output = $output_headers . \n--HEADERS--\n . $output;
if (isset($wanted_re)) {
-   $wanted_re = $wanted_headers . \n--HEADERS--\n . 
$wanted_re;
+   $wanted_re = preg_quote($wanted_headers . 
\n--HEADERS--\n, '/') . $wanted_re;
}
}
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src / run-tests.php

2008-01-05 Thread Nuno Lopes
Please also update http://qa.php.net/write-test.php (in cvs, under the qaweb 
module).


Thanks,
Nuno


- Original Message - 
From: Greg Beaver [EMAIL PROTECTED]

To: php-cvs@lists.php.net
Sent: Saturday, January 05, 2008 9:04 PM
Subject: [PHP-CVS] cvs: php-src / run-tests.php



cellog Sat Jan  5 21:04:55 2008 UTC

 Modified files:
   /php-src run-tests.php
 Log:
 implement --FILE_EXTERNAL-- section for using an external file 
as --FILE--, use CGI for --EXPECTHEADERS--, fix --POST_RAW--


http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.337r2=1.338diff_format=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.337 php-src/run-tests.php:1.338
--- php-src/run-tests.php:1.337 Tue Jan  1 06:22:15 2008
+++ php-src/run-tests.php Sat Jan  5 21:04:55 2008
@@ -24,7 +24,7 @@

+--+
 */

-/* $Id: run-tests.php,v 1.337 2008/01/01 06:22:15 sebastian Exp $ */
+/* $Id: run-tests.php,v 1.338 2008/01/05 21:04:55 cellog 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

@@ -415,7 +415,7 @@
 $html_output = is_resource($html_file);
 break;
 case '--version':
- echo '$Revision: 1.337 $'.\n;
+ echo '$Revision: 1.338 $'.\n;
 exit(1);
 default:
 echo Illegal switch specified!\n;
@@ -1056,7 +1056,7 @@
 if (preg_match('/^--([_A-Z]+)--/', $line, $r)) {
 $section = $r[1];
 $section_text[$section] = '';
- $secfile = $section == 'FILE' || $section == 'FILEEOF';
+ $secfile = $section == 'FILE' || $section == 'FILEEOF' || $section == 
'FILE_EXTERNAL';

 $secdone = false;
 continue;
 }
@@ -1082,7 +1082,7 @@
 $borked = false;
 }
 } else {
- if (@count($section_text['FILE']) + @count($section_text['FILEEOF']) != 
1) {
+ if (@count($section_text['FILE']) + @count($section_text['FILEEOF']) + 
@count($section_text['FILE_EXTERNAL']) != 1) {

 $bork_info = missing section --FILE--;
 $borked = true;
 }
@@ -1090,6 +1090,17 @@
 $section_text['FILE'] = preg_replace(/[\r\n]+$/, '', 
$section_text['FILEEOF']);

 unset($section_text['FILEEOF']);
 }
+ if (@count($section_text['FILE_EXTERNAL']) == 1) {
+ // don't allow tests to retrieve files from anywhere but this 
subdirectory
+ $section_text['FILE_EXTERNAL'] = dirname($file) . '/' . 
trim(str_replace('..', '', $section_text['FILE_EXTERNAL']));

+ if (@file_exists($section_text['FILE_EXTERNAL'])) {
+ $section_text['FILE'] = 
file_get_contents($section_text['FILE_EXTERNAL']);

+ unset($section_text['FILE_EXTERNAL']);
+ } else {
+ $bork_info = could not load --FILE_EXTERNAL--  . dirname($file) . '/' 
. trim($section_text['FILE_EXTERNAL']);

+ $borked = true;
+ }
+ }
 if ((@count($section_text['EXPECT']) + @count($section_text['EXPECTF']) + 
@count($section_text['EXPECTREGEX'])) != 1) {
 $bork_info = missing section --EXPECT--, --EXPECTF--  
or --EXPECTREGEX--;

 $borked = true;
@@ -1120,7 +1131,7 @@
 $tested = trim($section_text['TEST']);

 /* For GET/POST tests, check if cgi sapi is available and if it is, use 
it. */
- if (!empty($section_text['GET']) || !empty($section_text['POST']) || 
!empty($section_text['POST_RAW']) || !empty($section_text['COOKIE'])) {
+ if (!empty($section_text['GET']) || !empty($section_text['POST']) || 
!empty($section_text['POST_RAW']) || !empty($section_text['COOKIE']) || 
!empty($section_text['EXPECTHEADERS'])) {

 if (isset($php_cgi)) {
 $old_php = $php;
 $php = $php_cgi .' -C ';
@@ -1418,12 +1429,15 @@
 $raw_lines = explode(\n, $post);

 $request = '';
+ $started = false;
 foreach ($raw_lines as $line) {
 if (empty($env['CONTENT_TYPE'])  preg_match('/^Content-Type:(.*)/i', 
$line, $res)) {

 $env['CONTENT_TYPE'] = trim(str_replace(\r, '', $res[1]));
 continue;
 }
- $request .= $line . \n;
+ if ($started) $request .= \n;
+ $started = true;
+ $request .= $line;
 }

 $env['CONTENT_LENGTH'] = strlen($request); 


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php