[PHP-CVS] com php-src: Fixed bug61115-1.phpt for debug build version.: ext/standard/tests/streams/bug61115-1.phpt

2012-03-29 Thread Shein Alexey
Commit:e1352b04165142c945d1fc98c0bcd0b85c3f659d
Author:Shein Alexey con...@gmail.com Thu, 29 Mar 2012 16:51:45 
+0500
Parents:   55b1e612421c52ea0bb8a3772095c5bbd62045db
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=e1352b04165142c945d1fc98c0bcd0b85c3f659d

Log:
Fixed bug61115-1.phpt for debug build version.

Bugs:
https://bugs.php.net/61115

Changed paths:
  M  ext/standard/tests/streams/bug61115-1.phpt


Diff:
e1352b04165142c945d1fc98c0bcd0b85c3f659d
diff --git a/ext/standard/tests/streams/bug61115-1.phpt 
b/ext/standard/tests/streams/bug61115-1.phpt
index 43c54b4..573496e 100644
--- a/ext/standard/tests/streams/bug61115-1.phpt
+++ b/ext/standard/tests/streams/bug61115-1.phpt
@@ -8,4 +8,4 @@ stream_context_get_options($fileResourceTemp);
 ftruncate($fileResourceTemp, PHP_INT_MAX);
 ?
 --EXPECTF--
-Fatal error: Allowed memory size of %d bytes exhausted at %s:%d (tried to 
allocate %d bytes) in %s on line %d
+Fatal error: Allowed memory size of %d bytes exhausted %s (tried to allocate 
%d bytes) in %s on line %d


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



[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/tests/lang/ 019.phpt

2012-01-02 Thread Shein Alexey
sheinMon, 02 Jan 2012 20:02:21 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=321694

Log:
Fixed broken test (different error message wording in 5.3 branch)

Changed paths:
U   php/php-src/branches/PHP_5_3/tests/lang/019.phpt

Modified: php/php-src/branches/PHP_5_3/tests/lang/019.phpt
===
--- php/php-src/branches/PHP_5_3/tests/lang/019.phpt2012-01-02 18:49:33 UTC 
(rev 321693)
+++ php/php-src/branches/PHP_5_3/tests/lang/019.phpt2012-01-02 20:02:21 UTC 
(rev 321694)
@@ -35,4 +35,4 @@
 hey, this is a regular echo'd eval()
 hey, this is a function inside an eval()!

-Parse error: syntax error, unexpected end of file in %s019.php(12) : eval()'d 
code on line 1
+Parse error: syntax error, unexpected $end in %s019.php(12) : eval()'d code on 
line 1

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/sapi/cli/tests/php_cli_server.inc branches/PHP_5_4/sapi/cli/tests/php_cli_server_001.phpt branches/PHP_5_4/sapi/cli/tests/php_cli_server_002.phpt branches

2011-09-20 Thread Shein Alexey
sheinTue, 20 Sep 2011 14:53:46 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=317059

Log:
Refactored and speeded up php_cli_server tests, also get rid of test hanging on 
ubuntu:
1) Prepended starting the server with exec so proc_terminate can correctly 
close it (see also this note 
http://www.php.net/manual/en/function.proc-get-status.php#93382 for details)
2) Moved putting down the server to the shutdown function to make it 
independent from tests (fatal) errors
3) Moved php cli executable into the function to make tests more readable
4) changed sleep(1) to usleep(5) (50 ms) to make tests faster - this needs 
more testing and if timeout is too small should be increased

Bug: https://bugs.php.net/93382 (error getting bug information)
  
Changed paths:
U   php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server.inc
U   php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server_001.phpt
U   php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server_002.phpt
U   php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server_003.phpt
U   php/php-src/trunk/sapi/cli/tests/php_cli_server.inc
U   php/php-src/trunk/sapi/cli/tests/php_cli_server_001.phpt
U   php/php-src/trunk/sapi/cli/tests/php_cli_server_002.phpt
U   php/php-src/trunk/sapi/cli/tests/php_cli_server_003.phpt

Modified: php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server.inc
===
--- php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server.inc  
2011-09-20 13:40:40 UTC (rev 317058)
+++ php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server.inc  
2011-09-20 14:53:46 UTC (rev 317059)
@@ -1,7 +1,8 @@
 ?php
 define (PHP_CLI_SERVER_ADDRESS, localhost:8964);

-function php_cli_server_start($php_executable, $code = 'echo Hello world;') {
+function php_cli_server_start($code = 'echo Hello world;') {
+$php_executable = getenv('TEST_PHP_EXECUTABLE');
$doc_root = __DIR__;
$router = router.php;
file_put_contents($doc_root . '/' . $router, '?php ' . $code . ' ?');
@@ -12,18 +13,18 @@
2 = STDERR,
);

-   $cmd = {$php_executable} -t {$doc_root} -S  . PHP_CLI_SERVER_ADDRESS 
.  {$router};
+   $cmd = exec {$php_executable} -t {$doc_root} -S  . 
PHP_CLI_SERVER_ADDRESS .  {$router};

$handle = proc_open($cmd, $descriptorspec, $pipes, $doc_root);
-   sleep(1);

-   return $handle;
-}
+register_shutdown_function(
+function($handle) {
+proc_terminate($handle);
+@unlink(__DIR__ . /router.php);
+},
+$handle
+);

-function php_cli_server_shutdown($handle) {
-   proc_terminate($handle);
-   proc_close($handle);
-   @unlink(__DIR__ . router.php);
-   return true;
+usleep(5);
 }
 ?

Modified: php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server_001.phpt
===
--- php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server_001.phpt 
2011-09-20 13:40:40 UTC (rev 317058)
+++ php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server_001.phpt 
2011-09-20 14:53:46 UTC (rev 317059)
@@ -12,10 +12,8 @@
 --FILE--
 ?php
 include php_cli_server.inc;
-$php = getenv('TEST_PHP_EXECUTABLE');
-$handle = php_cli_server_start($php);
+php_cli_server_start();
 var_dump(file_get_contents(http://; . PHP_CLI_SERVER_ADDRESS));
-php_cli_server_shutdown($handle);
 ?
---EXPECT--
+--EXPECT--
 string(11) Hello world

Modified: php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server_002.phpt
===
--- php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server_002.phpt 
2011-09-20 13:40:40 UTC (rev 317058)
+++ php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server_002.phpt 
2011-09-20 14:53:46 UTC (rev 317059)
@@ -12,10 +12,8 @@
 --FILE--
 ?php
 include php_cli_server.inc;
-$php = getenv('TEST_PHP_EXECUTABLE');
-$handle = php_cli_server_start($php, 'var_dump($_SERVER[DOCUMENT_ROOT], 
$_SERVER[SERVER_SOFTWARE]);');
+php_cli_server_start('var_dump($_SERVER[DOCUMENT_ROOT], 
$_SERVER[SERVER_SOFTWARE]);');
 var_dump(file_get_contents(http://; . PHP_CLI_SERVER_ADDRESS));
-php_cli_server_shutdown($handle);
 ?
 --EXPECTF--
 string(%d) string(%d) %s/tests

Modified: php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server_003.phpt
===
--- php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server_003.phpt 
2011-09-20 13:40:40 UTC (rev 317058)
+++ php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server_003.phpt 
2011-09-20 14:53:46 UTC (rev 317059)
@@ -12,11 +12,9 @@
 --FILE--
 ?php
 include php_cli_server.inc;
-$php = getenv('TEST_PHP_EXECUTABLE');
-$handle = php_cli_server_start($php, 'chdir(/tmp); echo okey;');
+php_cli_server_start('chdir(/tmp); echo okey;');
 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/tests/strings/htmlentities_html4.phpt branches/PHP_5_4/ext/standard/tests/strings/htmlentities_html4.phpt trunk/ext/standard/tests/strings/ht

2011-09-05 Thread Shein Alexey
sheinMon, 05 Sep 2011 11:00:14 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316153

Log:
Make the test faster, what was done:
1) replaced multiple htmlentities calls with one call to get_html_translation 
table since they share the same code internally
2) reduced the upper range of the for loop to 0x2710 (1), according to 
http://www.w3.org/TR/html4/sgml/entities.html it's enough
3) placed additional check to make sure all entities from 
get_html_translation_table were checked in the test

Changed paths:
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/htmlentities_html4.phpt
U   
php/php-src/branches/PHP_5_4/ext/standard/tests/strings/htmlentities_html4.phpt
U   php/php-src/trunk/ext/standard/tests/strings/htmlentities_html4.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/htmlentities_html4.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/htmlentities_html4.phpt 
2011-09-05 10:59:26 UTC (rev 316152)
+++ 
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/htmlentities_html4.phpt 
2011-09-05 11:00:14 UTC (rev 316153)
@@ -1,9 +1,5 @@
 --TEST--
 htmlentities() conformance check (HTML 4)
---SKIPIF--
-?php
-if (getenv(SKIP_SLOW_TESTS)) die(skip slow test);
-?
 --FILE--
 ?php
 function utf32_utf8($k) {
@@ -43,15 +39,23 @@
return $retval;
 }

-for ($i = 0; $i  0x11; $i++) {
+$table = get_html_translation_table(HTML_ENTITIES, ENT_QUOTES, 'UTF-8');
+
+for ($i = 0; $i  0x2710; $i++) {
 if ($i = 0xd800  $i  0xe000)
 continue;
 $str = utf32_utf8($i);
-$result = htmlentities($str, ENT_QUOTES, 'UTF-8');
-if ($str != $result) {
-printf(%s\tU+%05X\n, $result, $i);
-}
+   if (isset($table[$str])) {
+   printf(%s\tU+%05X\n, $table[$str], $i);
+   unset($table[$str]);
+   }
 }
+
+if (!empty($table)) {
+   echo Not matched entities: ;
+   var_dump($table);
+}
+
 ?
 --EXPECT--
 quot; U+00022

Modified: 
php/php-src/branches/PHP_5_4/ext/standard/tests/strings/htmlentities_html4.phpt
===
--- 
php/php-src/branches/PHP_5_4/ext/standard/tests/strings/htmlentities_html4.phpt 
2011-09-05 10:59:26 UTC (rev 316152)
+++ 
php/php-src/branches/PHP_5_4/ext/standard/tests/strings/htmlentities_html4.phpt 
2011-09-05 11:00:14 UTC (rev 316153)
@@ -1,9 +1,5 @@
 --TEST--
 htmlentities() conformance check (HTML 4)
---SKIPIF--
-?php
-if (getenv(SKIP_SLOW_TESTS)) die(skip slow test);
-?
 --FILE--
 ?php
 function utf32_utf8($k) {
@@ -43,15 +39,23 @@
return $retval;
 }

-for ($i = 0; $i  0x11; $i++) {
+$table = get_html_translation_table(HTML_ENTITIES, ENT_QUOTES, 'UTF-8');
+
+for ($i = 0; $i  0x2710; $i++) {
 if ($i = 0xd800  $i  0xe000)
 continue;
 $str = utf32_utf8($i);
-$result = htmlentities($str, ENT_QUOTES, 'UTF-8');
-if ($str != $result) {
-printf(%s\tU+%05X\n, $result, $i);
-}
+   if (isset($table[$str])) {
+   printf(%s\tU+%05X\n, $table[$str], $i);
+   unset($table[$str]);
+   }
 }
+
+if (!empty($table)) {
+   echo Not matched entities: ;
+   var_dump($table);
+}
+
 ?
 --EXPECT--
 quot; U+00022

Modified: php/php-src/trunk/ext/standard/tests/strings/htmlentities_html4.phpt
===
--- php/php-src/trunk/ext/standard/tests/strings/htmlentities_html4.phpt
2011-09-05 10:59:26 UTC (rev 316152)
+++ php/php-src/trunk/ext/standard/tests/strings/htmlentities_html4.phpt
2011-09-05 11:00:14 UTC (rev 316153)
@@ -1,9 +1,5 @@
 --TEST--
 htmlentities() conformance check (HTML 4)
---SKIPIF--
-?php
-if (getenv(SKIP_SLOW_TESTS)) die(skip slow test);
-?
 --FILE--
 ?php
 function utf32_utf8($k) {
@@ -43,15 +39,23 @@
return $retval;
 }

-for ($i = 0; $i  0x11; $i++) {
+$table = get_html_translation_table(HTML_ENTITIES, ENT_QUOTES, 'UTF-8');
+
+for ($i = 0; $i  0x2710; $i++) {
 if ($i = 0xd800  $i  0xe000)
 continue;
 $str = utf32_utf8($i);
-$result = htmlentities($str, ENT_QUOTES, 'UTF-8');
-if ($str != $result) {
-printf(%s\tU+%05X\n, $result, $i);
-}
+   if (isset($table[$str])) {
+   printf(%s\tU+%05X\n, $table[$str], $i);
+   unset($table[$str]);
+   }
 }
+
+if (!empty($table)) {
+   echo Not matched entities: ;
+   var_dump($table);
+}
+
 ?
 --EXPECT--
 quot; U+00022

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/tests/file/fread_socket_variation1.phpt branches/PHP_5_4/ext/standard/tests/file/fread_socket_variation1.phpt trunk/ext/standard/tests/file/f

2011-09-05 Thread Shein Alexey
sheinMon, 05 Sep 2011 14:43:08 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316183

Log:
Reduced timeout in this test to 1ms, no need to wait further.

Changed paths:
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/file/fread_socket_variation1.phpt
U   
php/php-src/branches/PHP_5_4/ext/standard/tests/file/fread_socket_variation1.phpt
U   php/php-src/trunk/ext/standard/tests/file/fread_socket_variation1.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/standard/tests/file/fread_socket_variation1.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/standard/tests/file/fread_socket_variation1.phpt
   2011-09-05 13:52:24 UTC (rev 316182)
+++ 
php/php-src/branches/PHP_5_3/ext/standard/tests/file/fread_socket_variation1.phpt
   2011-09-05 14:43:08 UTC (rev 316183)
@@ -1,15 +1,11 @@
 --TEST--
 Testing fread() on a TCP server socket
---SKIPIF--
-?php
-if (getenv(SKIP_SLOW_TESTS)) die(skip slow test);
-?
 --FILE--
 ?php

 $tcp_socket = stream_socket_server('tcp://127.0.0.1:31337');

-socket_set_timeout($tcp_socket, 1);
+socket_set_timeout($tcp_socket, 0, 1000);

 var_dump(fread($tcp_socket, 1));


Modified: 
php/php-src/branches/PHP_5_4/ext/standard/tests/file/fread_socket_variation1.phpt
===
--- 
php/php-src/branches/PHP_5_4/ext/standard/tests/file/fread_socket_variation1.phpt
   2011-09-05 13:52:24 UTC (rev 316182)
+++ 
php/php-src/branches/PHP_5_4/ext/standard/tests/file/fread_socket_variation1.phpt
   2011-09-05 14:43:08 UTC (rev 316183)
@@ -1,15 +1,11 @@
 --TEST--
 Testing fread() on a TCP server socket
---SKIPIF--
-?php
-if (getenv(SKIP_SLOW_TESTS)) die(skip slow test);
-?
 --FILE--
 ?php

 $tcp_socket = stream_socket_server('tcp://127.0.0.1:31337');

-socket_set_timeout($tcp_socket, 1);
+socket_set_timeout($tcp_socket, 0, 1000);

 var_dump(fread($tcp_socket, 1));


Modified: php/php-src/trunk/ext/standard/tests/file/fread_socket_variation1.phpt
===
--- php/php-src/trunk/ext/standard/tests/file/fread_socket_variation1.phpt  
2011-09-05 13:52:24 UTC (rev 316182)
+++ php/php-src/trunk/ext/standard/tests/file/fread_socket_variation1.phpt  
2011-09-05 14:43:08 UTC (rev 316183)
@@ -1,15 +1,11 @@
 --TEST--
 Testing fread() on a TCP server socket
---SKIPIF--
-?php
-if (getenv(SKIP_SLOW_TESTS)) die(skip slow test);
-?
 --FILE--
 ?php

 $tcp_socket = stream_socket_server('tcp://127.0.0.1:31337');

-socket_set_timeout($tcp_socket, 1);
+socket_set_timeout($tcp_socket, 0, 1000);

 var_dump(fread($tcp_socket, 1));


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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/zip/tests/bug38943.inc branches/PHP_5_3/ext/zip/tests/bug38943.phpt branches/PHP_5_3/ext/zip/tests/bug38943_2.phpt branches/PHP_5_4/ext/zip/tests/bug3

2011-09-02 Thread Shein Alexey
sheinFri, 02 Sep 2011 17:41:39 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316041

Log:
Removed old ( 5.3) version of test and cleaned up the actual version.

Changed paths:
D   php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.inc
D   php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.phpt
A + php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.phpt
(from 
php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943_2.phpt:r316040)
D   php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943_2.phpt
D   php/php-src/branches/PHP_5_4/ext/zip/tests/bug38943.inc
D   php/php-src/branches/PHP_5_4/ext/zip/tests/bug38943.phpt
A + php/php-src/branches/PHP_5_4/ext/zip/tests/bug38943.phpt
(from 
php/php-src/branches/PHP_5_4/ext/zip/tests/bug38943_2.phpt:r316040)
D   php/php-src/branches/PHP_5_4/ext/zip/tests/bug38943_2.phpt
D   php/php-src/trunk/ext/zip/tests/bug38943.inc
D   php/php-src/trunk/ext/zip/tests/bug38943.phpt
A + php/php-src/trunk/ext/zip/tests/bug38943.phpt
(from php/php-src/trunk/ext/zip/tests/bug38943_2.phpt:r316040)
D   php/php-src/trunk/ext/zip/tests/bug38943_2.phpt

Deleted: php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.inc
===
--- php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.inc	2011-09-02 14:40:39 UTC (rev 316040)
+++ php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.inc	2011-09-02 17:41:39 UTC (rev 316041)
@@ -1,16 +0,0 @@
-?php
-class myZip extends ZipArchive {
-	private $test = 0;
-	public $testp = 1;
-	private $testarray = array();
-
-	public function __construct() {
-		$this-testarray[] = 1;
-		var_dump($this-testarray);
-	}
-}
-
-$z = new myZip;
-$z-testp = foobar;
-var_dump($z);
-

Deleted: php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.phpt
===
--- php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.phpt	2011-09-02 14:40:39 UTC (rev 316040)
+++ php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.phpt	2011-09-02 17:41:39 UTC (rev 316041)
@@ -1,38 +0,0 @@
---TEST--
-#38943, properties in extended class cannot be set ( 5.3)
---SKIPIF--
-?php
-/* $Id$ */
-if(!extension_loaded('zip')) die('skip');
-if (!defined('PHP_VERSION_MAJOR')) die('skip');
-?
---FILE--
-?php
-include dirname(__FILE__) . '/bug38943.inc';
-?
---EXPECTF--
-array(1) {
-  [0]=
-  int(1)
-}
-object(myZip)#1 (%d) {
-  [test:private]=
-  int(0)
-  [testp]=
-  string(6) foobar
-  [testarray:private]=
-  array(1) {
-[0]=
-int(1)
-  }
-  [status]=
-  int(0)
-  [statusSys]=
-  int(0)
-  [numFiles]=
-  int(0)
-  [filename]=
-  string(0) 
-  [comment]=
-  string(0) 
-}

Copied: php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.phpt (from rev 316040, php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943_2.phpt)
===
--- php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943.phpt	2011-09-02 17:41:39 UTC (rev 316041)
@@ -0,0 +1,50 @@
+--TEST--
+#38943, properties in extended class cannot be set (5.3+)
+--SKIPIF--
+?php
+if(!extension_loaded('zip')) die('skip');
+?
+--FILE--
+?php
+class myZip extends ZipArchive {
+	private $test = 0;
+	public $testp = 1;
+	private $testarray = array();
+
+	public function __construct() {
+		$this-testarray[] = 1;
+		var_dump($this-testarray);
+	}
+}
+
+$z = new myZip;
+$z-testp = foobar;
+var_dump($z);
+
+?
+--EXPECTF--
+array(1) {
+  [0]=
+  int(1)
+}
+object(myZip)#1 (%d) {
+  [test:myZip:private]=
+  int(0)
+  [testp]=
+  string(6) foobar
+  [testarray:myZip:private]=
+  array(1) {
+[0]=
+int(1)
+  }
+  [status]=
+  int(0)
+  [statusSys]=
+  int(0)
+  [numFiles]=
+  int(0)
+  [filename]=
+  string(0) 
+  [comment]=
+  string(0) 
+}

Deleted: php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943_2.phpt
===
--- php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943_2.phpt	2011-09-02 14:40:39 UTC (rev 316040)
+++ php/php-src/branches/PHP_5_3/ext/zip/tests/bug38943_2.phpt	2011-09-02 17:41:39 UTC (rev 316041)
@@ -1,38 +0,0 @@
---TEST--
-#38943, properties in extended class cannot be set (5.3)
---SKIPIF--
-?php
-/* $Id$ */
-if(!extension_loaded('zip')) die('skip');
-if (version_compare(PHP_VERSION, 5.3, )) die('skip test for5.3+ only');
-?
---FILE--
-?php
-include 'bug38943.inc';
-?
---EXPECTF--
-array(1) {
-  [0]=
-  int(1)
-}
-object(myZip)#1 (%d) {
-  [test:myZip:private]=
-  int(0)
-  [testp]=
-  string(6) foobar
-  [testarray:myZip:private]=
-  array(1) {
-[0]=
-int(1)
-  }
-  [status]=
-  int(0)
-  [statusSys]=
-  int(0)
-  [numFiles]=
-  int(0)
-  [filename]=
-  string(0) 
-  [comment]=
-  string(0) 
-}

Deleted: php/php-src/branches/PHP_5_4/ext/zip/tests/bug38943.inc

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt branches/PHP_5_4/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt trunk/

2011-09-02 Thread Shein Alexey
sheinFri, 02 Sep 2011 18:01:20 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316043

Log:
Synchronized fixed tests from 5.3 branch.

Changed paths:
U   
php/php-src/branches/PHP_5_4/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt
U   
php/php-src/branches/PHP_5_4/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt
U   
php/php-src/trunk/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt
U   
php/php-src/trunk/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt

Modified: 
php/php-src/branches/PHP_5_4/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt
===
--- 
php/php-src/branches/PHP_5_4/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt
 2011-09-02 17:56:07 UTC (rev 316042)
+++ 
php/php-src/branches/PHP_5_4/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt
 2011-09-02 18:01:20 UTC (rev 316043)
@@ -21,10 +21,17 @@
 $proc-importStylesheet($phpfuncxsl);
 var_dump($proc-registerPHPFunctions());
 var_dump($proc-transformToXml($dom));
+?
 --EXPECTF--
 NULL

 Warning: XSLTProcessor::transformToXml(): Handler name must be a string in %s 
on line %d
+
+Warning: XSLTProcessor::transformToXml(): xmlXPathCompiledEval: evaluation 
failed in %s on line %d
+
+Warning: XSLTProcessor::transformToXml(): runtime error: file %s line %d 
element value-of in %s on line %d
+
+Warning: XSLTProcessor::transformToXml(): XPath evaluation returned no result. 
in %s on line %d
 NULL
 --CREDITS--
 Christian Weiske, cwei...@php.net

Modified: 
php/php-src/branches/PHP_5_4/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt
===
--- 
php/php-src/branches/PHP_5_4/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt
2011-09-02 17:56:07 UTC (rev 316042)
+++ 
php/php-src/branches/PHP_5_4/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt
2011-09-02 18:01:20 UTC (rev 316043)
@@ -20,10 +20,17 @@
 $proc-importStylesheet($phpfuncxsl);
 var_dump($proc-registerPHPFunctions());
 var_dump($proc-transformToXml($dom));
+?
 --EXPECTF--
 NULL

 Warning: XSLTProcessor::transformToXml(): Unable to call handler 
undefinedfunc() in %s on line %d
+
+Warning: XSLTProcessor::transformToXml(): xmlXPathCompiledEval: evaluation 
failed in %s on line %d
+
+Warning: XSLTProcessor::transformToXml(): runtime error: file %s line %d 
element value-of in %s on line %d
+
+Warning: XSLTProcessor::transformToXml(): XPath evaluation returned no result. 
in %s on line %d
 NULL
 --CREDITS--
 Christian Weiske, cwei...@php.net

Modified: 
php/php-src/trunk/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt
===
--- 
php/php-src/trunk/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt
2011-09-02 17:56:07 UTC (rev 316042)
+++ 
php/php-src/trunk/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt
2011-09-02 18:01:20 UTC (rev 316043)
@@ -21,10 +21,17 @@
 $proc-importStylesheet($phpfuncxsl);
 var_dump($proc-registerPHPFunctions());
 var_dump($proc-transformToXml($dom));
+?
 --EXPECTF--
 NULL

 Warning: XSLTProcessor::transformToXml(): Handler name must be a string in %s 
on line %d
+
+Warning: XSLTProcessor::transformToXml(): xmlXPathCompiledEval: evaluation 
failed in %s on line %d
+
+Warning: XSLTProcessor::transformToXml(): runtime error: file %s line %d 
element value-of in %s on line %d
+
+Warning: XSLTProcessor::transformToXml(): XPath evaluation returned no result. 
in %s on line %d
 NULL
 --CREDITS--
 Christian Weiske, cwei...@php.net

Modified: 
php/php-src/trunk/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt
===
--- 
php/php-src/trunk/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt
   2011-09-02 17:56:07 UTC (rev 316042)
+++ 
php/php-src/trunk/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt
   2011-09-02 18:01:20 UTC (rev 316043)
@@ -20,10 +20,17 @@
 $proc-importStylesheet($phpfuncxsl);
 var_dump($proc-registerPHPFunctions());
 var_dump($proc-transformToXml($dom));
+?
 --EXPECTF--
 NULL

 Warning: XSLTProcessor::transformToXml(): Unable to call handler 
undefinedfunc() in %s on line %d
+
+Warning: XSLTProcessor::transformToXml(): xmlXPathCompiledEval: evaluation 
failed in %s on line %d
+
+Warning: XSLTProcessor::transformToXml(): runtime error: file %s line %d 
element value-of in %s on line %d
+
+Warning: XSLTProcessor::transformToXml(): XPath evaluation returned no result. 
in %s on line %d
 NULL
 --CREDITS--
 Christian Weiske, cwei...@php.net

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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/dom/tests/ DOMDocument_relaxNGValidate_error2.phpt

2011-08-24 Thread Shein Alexey
sheinWed, 24 Aug 2011 12:25:30 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=315418

Log:
Fixed failed test to take into account printed warnings like in 5.4 and trunk 
branches.

Changed paths:
U   
php/php-src/branches/PHP_5_3/ext/dom/tests/DOMDocument_relaxNGValidate_error2.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/dom/tests/DOMDocument_relaxNGValidate_error2.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/dom/tests/DOMDocument_relaxNGValidate_error2.phpt
  2011-08-24 12:11:39 UTC (rev 315417)
+++ 
php/php-src/branches/PHP_5_3/ext/dom/tests/DOMDocument_relaxNGValidate_error2.phpt
  2011-08-24 12:25:30 UTC (rev 315418)
@@ -23,3 +23,9 @@
 ?
 --EXPECTF--

+Warning: DOMDocument::relaxNGValidate(): I/O warning : failed to load external 
entity %s/foo.rng in %s on line %d
+
+Warning: DOMDocument::relaxNGValidate(): xmlRelaxNGParse: could not load 
%s/foo.rng in %s on line %d
+
+Warning: DOMDocument::relaxNGValidate(): Invalid RelaxNG in %s on line %d
+bool(false)

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt branches/PHP_5_3/ext/dom/tests/dom004.phpt branches/PHP_5_3/ext/dom/tests/dom_xinclude.phpt bra

2011-06-22 Thread Shein Alexey
sheinWed, 22 Jun 2011 09:28:14 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=312375

Log:
Fixed dom tests.

Changed paths:
U   
php/php-src/branches/PHP_5_3/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
U   php/php-src/branches/PHP_5_3/ext/dom/tests/dom004.phpt
U   php/php-src/branches/PHP_5_3/ext/dom/tests/dom_xinclude.phpt
U   
php/php-src/branches/PHP_5_4/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
U   php/php-src/branches/PHP_5_4/ext/dom/tests/dom004.phpt
U   php/php-src/branches/PHP_5_4/ext/dom/tests/dom_xinclude.phpt
U   
php/php-src/trunk/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
U   php/php-src/trunk/ext/dom/tests/dom004.phpt
U   php/php-src/trunk/ext/dom/tests/dom_xinclude.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
 2011-06-22 09:09:01 UTC (rev 312374)
+++ 
php/php-src/branches/PHP_5_3/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
 2011-06-22 09:28:14 UTC (rev 312375)
@@ -6,17 +6,14 @@
 --SKIPIF--
 ?php
 require_once('skipif.inc');
-
-// need external DTD/XML docs
-if( @file_get_contents('http://www.php.net/docs.php') === FALSE )
-exit('skip network not available');
 ?
 --FILE--
 ?php

 require_once('dom_test.inc');

-$XMLStringGood = file_get_contents('http://www.php.net/docs.php');
+chdir(__DIR__ . /../examples);
+$XMLStringGood = file_get_contents('note.xml');

 $dom = new DOMDocument;
 $dom-resolveExternals = TRUE;
@@ -27,7 +24,7 @@
 echo No Error Report Above\n;

 $BogusElement = $dom-createElement('NYPHP','DOMinatrix');
-$Body = $dom-getElementsByTagName('body')-item(0);
+$Body = $dom-getElementsByTagName('from')-item(0);
 $Body-appendChild($BogusElement);
 $XMLStringBad = $dom-saveXML();

@@ -42,12 +39,8 @@
 No Error Report Above
 validateOnParse set to TRUE:

-Warning: DOMDocument::loadXML(): Entity 'nbsp' not defined in Entity, line: %d 
in %s on line %d
-
-Warning: DOMDocument::loadXML(): Entity 'copy' not defined in Entity, line: %d 
in %s on line %d
-
 Warning: DOMDocument::loadXML(): No declaration for element NYPHP in Entity, 
line: %d in %s on line %d

-Warning: DOMDocument::loadXML(): Element body content does not follow the DTD, 
expecting (p | h1 | h2 | h3 | h4 | h5 | h6 | div | ul | ol | dl | pre | hr | 
blockquote | address | fieldset | table | form | noscript | ins | del | 
script)*, got (div div div div div NYPHP) in Entity, line: %d in %s on line %d
+Warning: DOMDocument::loadXML(): Element from was declared #PCDATA but 
contains non text nodes in Entity, line: %d in %s on line %d
 Error Report Above


Modified: php/php-src/branches/PHP_5_3/ext/dom/tests/dom004.phpt
===
--- php/php-src/branches/PHP_5_3/ext/dom/tests/dom004.phpt  2011-06-22 
09:09:01 UTC (rev 312374)
+++ php/php-src/branches/PHP_5_3/ext/dom/tests/dom004.phpt  2011-06-22 
09:28:14 UTC (rev 312375)
@@ -3,7 +3,7 @@
 --SKIPIF--
 ?php
 require_once('skipif.inc');
-array_search('compress.zlib', stream_get_wrappers()) or die('skip 
compress.zlib wrapper is not available');
+in_array('compress.zlib', stream_get_wrappers()) or die('skip compress.zlib 
wrapper is not available');
 ?
 --FILE--
 ?php

Modified: php/php-src/branches/PHP_5_3/ext/dom/tests/dom_xinclude.phpt
===
--- php/php-src/branches/PHP_5_3/ext/dom/tests/dom_xinclude.phpt
2011-06-22 09:09:01 UTC (rev 312374)
+++ php/php-src/branches/PHP_5_3/ext/dom/tests/dom_xinclude.phpt
2011-06-22 09:28:14 UTC (rev 312375)
@@ -3,7 +3,7 @@
 --SKIPIF--
 ?php
 require_once('skipif.inc');
-array_search('compress.zlib', stream_get_wrappers()) or die('skip 
compress.zlib wrapper is not available');
+in_array('compress.zlib', stream_get_wrappers()) or die('skip compress.zlib 
wrapper is not available');
 ?
 --FILE--
 ?php

Modified: 
php/php-src/branches/PHP_5_4/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
===
--- 
php/php-src/branches/PHP_5_4/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
 2011-06-22 09:09:01 UTC (rev 312374)
+++ 
php/php-src/branches/PHP_5_4/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
 2011-06-22 09:28:14 UTC (rev 312375)
@@ -39,10 +39,6 @@
 No Error Report Above
 validateOnParse set to TRUE:

-Warning: DOMDocument::loadXML(): Entity 'nbsp' not defined in Entity, line: %d 
in %s on line %d
-
-Warning: DOMDocument::loadXML(): Entity 'copy' not defined in Entity, line: %d 
in %s on line %d
-
 Warning: DOMDocument::loadXML(): No declaration for element NYPHP in Entity, 
line: %d in %s on line %d

 Warning: 

[PHP-CVS] svn: /php/php-src/trunk/ext/curl/tests/ curl_basic_011.phpt curl_basic_012.phpt curl_basic_013.phpt

2011-06-09 Thread Shein Alexey
sheinThu, 09 Jun 2011 06:49:31 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=311958

Log:
Removed 'b' string prefix as unneeded from some tests.

Changed paths:
U   php/php-src/trunk/ext/curl/tests/curl_basic_011.phpt
U   php/php-src/trunk/ext/curl/tests/curl_basic_012.phpt
U   php/php-src/trunk/ext/curl/tests/curl_basic_013.phpt

Modified: php/php-src/trunk/ext/curl/tests/curl_basic_011.phpt
===
--- php/php-src/trunk/ext/curl/tests/curl_basic_011.phpt2011-06-09 
05:47:42 UTC (rev 311957)
+++ php/php-src/trunk/ext/curl/tests/curl_basic_011.phpt2011-06-09 
06:49:31 UTC (rev 311958)
@@ -3,7 +3,7 @@
 --CREDITS--
 TestFest 2009 - AFUP - Xavier Gorse xgo...@elao.com
 --SKIPIF--
-?php if (!extension_loaded(curl) || false === 
getenv(b'PHP_CURL_HTTP_REMOTE_SERVER')) print skip; ?
+?php if (!extension_loaded(curl) || false === 
getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print skip; ?
 --FILE--
 ?php
 /* Prototype  : bool curl_setopt(resource ch, int option, mixed value)
@@ -35,4 +35,3 @@
 *** Testing curl with cookie ***
 string(3) bar
 ===DONE===
-
\ No newline at end of file

Modified: php/php-src/trunk/ext/curl/tests/curl_basic_012.phpt
===
--- php/php-src/trunk/ext/curl/tests/curl_basic_012.phpt2011-06-09 
05:47:42 UTC (rev 311957)
+++ php/php-src/trunk/ext/curl/tests/curl_basic_012.phpt2011-06-09 
06:49:31 UTC (rev 311958)
@@ -3,7 +3,7 @@
 --CREDITS--
 TestFest 2009 - AFUP - Xavier Gorse xgo...@elao.com
 --SKIPIF--
-?php if (!extension_loaded(curl) || false === 
getenv(b'PHP_CURL_HTTP_REMOTE_SERVER')) print skip; ?
+?php if (!extension_loaded(curl) || false === 
getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print skip; ?
 --FILE--
 ?php
 /* Prototype  : bool curl_setopt(resource ch, int option, mixed value)
@@ -35,4 +35,3 @@
 *** Testing curl with HTTP/1.0 ***
 string(8) HTTP/1.0
 ===DONE===
-
\ No newline at end of file

Modified: php/php-src/trunk/ext/curl/tests/curl_basic_013.phpt
===
--- php/php-src/trunk/ext/curl/tests/curl_basic_013.phpt2011-06-09 
05:47:42 UTC (rev 311957)
+++ php/php-src/trunk/ext/curl/tests/curl_basic_013.phpt2011-06-09 
06:49:31 UTC (rev 311958)
@@ -3,7 +3,7 @@
 --CREDITS--
 TestFest 2009 - AFUP - Xavier Gorse xgo...@elao.com
 --SKIPIF--
-?php if (!extension_loaded(curl) || false === 
getenv(b'PHP_CURL_HTTP_REMOTE_SERVER')) print skip; ?
+?php if (!extension_loaded(curl) || false === 
getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print skip; ?
 --FILE--
 ?php
 /* Prototype  : bool curl_setopt(resource ch, int option, mixed value)
@@ -35,4 +35,3 @@
 *** Testing curl with HTTP/1.1 ***
 string(8) HTTP/1.1
 ===DONE===
-
\ No newline at end of file

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

[PHP-CVS] svn: /php/php-src/trunk/ext/curl/tests/ bug48203.phpt bug48203_multi.phpt curl_file_deleted_before_curl_close.phpt

2011-06-09 Thread Shein Alexey
sheinThu, 09 Jun 2011 07:16:13 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=311959

Log:
Updated (currently failing) test for bug48203 with curl_stderr and added also 
curl_multi_exec variant of this test.

Bug: http://bugs.php.net/48203 (Closed) crash when CURLOPT_STDERR is set to 
regular file
  
Changed paths:
U   php/php-src/trunk/ext/curl/tests/bug48203.phpt
A + php/php-src/trunk/ext/curl/tests/bug48203_multi.phpt
(from php/php-src/trunk/ext/curl/tests/bug48203.phpt:r311171)
A   
php/php-src/trunk/ext/curl/tests/curl_file_deleted_before_curl_close.phpt

Modified: php/php-src/trunk/ext/curl/tests/bug48203.phpt
===
--- php/php-src/trunk/ext/curl/tests/bug48203.phpt  2011-06-09 06:49:31 UTC 
(rev 311958)
+++ php/php-src/trunk/ext/curl/tests/bug48203.phpt  2011-06-09 07:16:13 UTC 
(rev 311959)
@@ -1,5 +1,5 @@
 --TEST--
-Bug #48203 (Crash when CURLOPT_STDERR is set to regular file)
+Bug #48203 (Crash when file pointers passed to curl are closed before calling 
curl_exec)
 --SKIPIF--
 ?php
 if (!extension_loaded(curl)) {
@@ -12,22 +12,68 @@
 --FILE--
 ?php

-$fp = fopen(dirname(__FILE__) . '/bug48203.tmp', 'w');
+function checkForClosedFilePointer($curl_option, $description) {
+   $fp = fopen(dirname(__FILE__) . '/bug48203.tmp', 'w+');

-$ch = curl_init();
+   $ch = curl_init();

-curl_setopt($ch, CURLOPT_VERBOSE, 1);
-curl_setopt($ch, CURLOPT_STDERR, $fp);
-curl_setopt($ch, CURLOPT_URL, );
+   // we also need CURLOPT_VERBOSE to be set to test CURLOPT_STDERR 
properly
+   if (CURLOPT_STDERR == $curl_option) {
+   curl_setopt($ch, CURLOPT_VERBOSE, 1);
+   }

-fclose($fp); // -- premature close of $fp caused a crash!
+if (CURLOPT_INFILE == $curl_option) {
+curl_setopt($ch, CURLOPT_UPLOAD, 1);
+}

-curl_exec($ch);
+   curl_setopt($ch, $curl_option, $fp);
+
+   curl_setopt($ch, CURLOPT_URL, 'localhost');
+   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

-echo Ok\n;
+   fclose($fp); // -- premature close of $fp caused a crash!

+   curl_exec($ch);
+
+   curl_close($ch);
+
+   echo Ok for $description\n;
+}
+
+$options_to_check = array(
+   CURLOPT_STDERR,
+CURLOPT_WRITEHEADER,
+CURLOPT_FILE,
+CURLOPT_INFILE
+);
+
+foreach($options_to_check as $option) {
+   checkForClosedFilePointer(constant($option), $option);
+}
+
 ?
 --CLEAN--
 ?php @unlink(dirname(__FILE__) . '/bug48203.tmp'); ?
---EXPECT--
-Ok
+--EXPECTF--
+Warning: curl_exec(): %d is not a valid stream resource in %s on line %d
+
+Warning: curl_exec(): CURLOPT_STDERR handle is incorrect in %s on line %d
+* About to connect() %a
+* Closing connection #%d
+Ok for CURLOPT_STDERR
+
+Warning: curl_exec(): %d is not a valid stream resource in %s on line %d
+
+Warning: curl_exec(): CURLOPT_WRITEHEADER handle is incorrect in %s on line %d
+Ok for CURLOPT_WRITEHEADER
+
+Warning: curl_exec(): %d is not a valid stream resource in %s on line %d
+
+Warning: curl_exec(): CURLOPT_FILE handle is incorrect in %s on line %d
+%a
+Ok for CURLOPT_FILE
+
+Warning: curl_exec(): %d is not a valid stream resource in %s on line %d
+
+Warning: curl_exec(): CURLOPT_INFILE handle is incorrect in %s on line %d
+Ok for CURLOPT_INFILE

Copied: php/php-src/trunk/ext/curl/tests/bug48203_multi.phpt (from rev 311171, 
php/php-src/trunk/ext/curl/tests/bug48203.phpt)
===
--- php/php-src/trunk/ext/curl/tests/bug48203_multi.phpt
(rev 0)
+++ php/php-src/trunk/ext/curl/tests/bug48203_multi.phpt2011-06-09 
07:16:13 UTC (rev 311959)
@@ -0,0 +1,106 @@
+--TEST--
+Variation of bug #48203 with curl_multi_exec (Crash when file pointers passed 
to curl are closed before calling curl_multi_exec)
+--SKIPIF--
+?php
+if (!extension_loaded(curl)) {
+   exit(skip curl extension not loaded);
+}
+if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER'))  {
+   exit(skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined);
+}
+?
+--FILE--
+?php
+
+function checkForClosedFilePointer($curl_option, $description) {
+   $fp = fopen(dirname(__FILE__) . '/bug48203.tmp', 'w');
+
+   $ch1 = curl_init();
+   $ch2 = curl_init();
+
+   $options = array(
+   CURLOPT_RETURNTRANSFER = 1,
+   $curl_option = $fp,
+   CURLOPT_URL = getenv(PHP_CURL_HTTP_REMOTE_SERVER)
+   );
+
+   // we also need to set CURLOPT_VERBOSE to test CURLOPT_STDERR properly
+   if (CURLOPT_STDERR == $curl_option) {
+   $options[CURLOPT_VERBOSE] = 1;
+   }
+
+   if (CURLOPT_INFILE == $curl_option) {
+   $options[CURLOPT_UPLOAD] = 1;
+   }
+
+   curl_setopt_array($ch1, $options);
+   curl_setopt_array($ch2, $options);
+
+   fclose($fp); // -- premature close of $fp caused a crash!
+
+   $mh = 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/session/tests/session_encode_basic.phpt branches/PHP_5_4/ext/session/tests/session_encode_basic.phpt trunk/ext/session/tests/session_encode_basic.phpt

2011-06-09 Thread Shein Alexey
sheinThu, 09 Jun 2011 07:44:10 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=311961

Log:
Fixed session test breakage due to serialize precision issue.

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/session/tests/session_encode_basic.phpt
U   php/php-src/branches/PHP_5_4/ext/session/tests/session_encode_basic.phpt
U   php/php-src/trunk/ext/session/tests/session_encode_basic.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/session/tests/session_encode_basic.phpt
===
--- php/php-src/branches/PHP_5_3/ext/session/tests/session_encode_basic.phpt
2011-06-09 07:20:56 UTC (rev 311960)
+++ php/php-src/branches/PHP_5_3/ext/session/tests/session_encode_basic.phpt
2011-06-09 07:44:10 UTC (rev 311961)
@@ -120,7 +120,7 @@
 string(20) data|d:123456789000;

 -- Iteration 8 --
-string(86) 
data|d:1.23456788145113427164344339914681114578343112953007221221923828125E-9;
+string(29) data|d:1.23456788E-9;

 -- Iteration 9 --
 string(11) data|d:0.5;

Modified: 
php/php-src/branches/PHP_5_4/ext/session/tests/session_encode_basic.phpt
===
--- php/php-src/branches/PHP_5_4/ext/session/tests/session_encode_basic.phpt
2011-06-09 07:20:56 UTC (rev 311960)
+++ php/php-src/branches/PHP_5_4/ext/session/tests/session_encode_basic.phpt
2011-06-09 07:44:10 UTC (rev 311961)
@@ -120,7 +120,7 @@
 string(20) data|d:123456789000;

 -- Iteration 8 --
-string(86) 
data|d:1.23456788145113427164344339914681114578343112953007221221923828125E-9;
+string(29) data|d:1.23456788E-9;

 -- Iteration 9 --
 string(11) data|d:0.5;

Modified: php/php-src/trunk/ext/session/tests/session_encode_basic.phpt
===
--- php/php-src/trunk/ext/session/tests/session_encode_basic.phpt   
2011-06-09 07:20:56 UTC (rev 311960)
+++ php/php-src/trunk/ext/session/tests/session_encode_basic.phpt   
2011-06-09 07:44:10 UTC (rev 311961)
@@ -120,7 +120,7 @@
 string(20) data|d:123456789000;

 -- Iteration 8 --
-string(86) 
data|d:1.23456788145113427164344339914681114578343112953007221221923828125E-9;
+string(29) data|d:1.23456788E-9;

 -- Iteration 9 --
 string(11) data|d:0.5;

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/session/tests/skipif.inc branches/PHP_5_4/ext/session/tests/skipif.inc trunk/ext/session/tests/skipif.inc

2011-06-09 Thread Shein Alexey
sheinThu, 09 Jun 2011 08:18:49 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=311962

Log:
Skip reason is now printed if session.save_path is not writable.

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/session/tests/skipif.inc
U   php/php-src/branches/PHP_5_4/ext/session/tests/skipif.inc
U   php/php-src/trunk/ext/session/tests/skipif.inc

Modified: php/php-src/branches/PHP_5_3/ext/session/tests/skipif.inc
===
--- php/php-src/branches/PHP_5_3/ext/session/tests/skipif.inc   2011-06-09 
07:44:10 UTC (rev 311961)
+++ php/php-src/branches/PHP_5_3/ext/session/tests/skipif.inc   2011-06-09 
08:18:49 UTC (rev 311962)
@@ -18,7 +18,7 @@
$save_path = substr($save_path, ++$p);
}
if (!@is_writable($save_path)) {
-   die(skip\n);
+   die(skip session.save_path $save_path is not 
writable\n);
}
}
 }

Modified: php/php-src/branches/PHP_5_4/ext/session/tests/skipif.inc
===
--- php/php-src/branches/PHP_5_4/ext/session/tests/skipif.inc   2011-06-09 
07:44:10 UTC (rev 311961)
+++ php/php-src/branches/PHP_5_4/ext/session/tests/skipif.inc   2011-06-09 
08:18:49 UTC (rev 311962)
@@ -18,7 +18,7 @@
$save_path = substr($save_path, ++$p);
}
if (!@is_writable($save_path)) {
-   die(skip\n);
+   die(skip session.save_path $save_path is not 
writable\n);
}
}
 }

Modified: php/php-src/trunk/ext/session/tests/skipif.inc
===
--- php/php-src/trunk/ext/session/tests/skipif.inc  2011-06-09 07:44:10 UTC 
(rev 311961)
+++ php/php-src/trunk/ext/session/tests/skipif.inc  2011-06-09 08:18:49 UTC 
(rev 311962)
@@ -18,7 +18,7 @@
$save_path = substr($save_path, ++$p);
}
if (!@is_writable($save_path)) {
-   die(skip\n);
+   die(skip session.save_path $save_path is not 
writable\n);
}
}
 }

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/session/tests/bug32330.phpt branches/PHP_5_4/ext/session/tests/bug32330.phpt trunk/ext/session/tests/bug32330.phpt

2011-06-09 Thread Shein Alexey
sheinThu, 09 Jun 2011 08:24:12 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=311965

Log:
Changed session.save_path to /tmp to make test run.

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/session/tests/bug32330.phpt
U   php/php-src/branches/PHP_5_4/ext/session/tests/bug32330.phpt
U   php/php-src/trunk/ext/session/tests/bug32330.phpt

Modified: php/php-src/branches/PHP_5_3/ext/session/tests/bug32330.phpt
===
--- php/php-src/branches/PHP_5_3/ext/session/tests/bug32330.phpt
2011-06-09 08:21:28 UTC (rev 311964)
+++ php/php-src/branches/PHP_5_3/ext/session/tests/bug32330.phpt
2011-06-09 08:24:12 UTC (rev 311965)
@@ -6,7 +6,7 @@
 session.use_trans_sid=0
 session.use_cookies=1
 session.name=sid
-session.save_path=/
+session.save_path=/tmp
 session.gc_probability=1
 session.gc_divisor=1
 --FILE--
@@ -68,17 +68,17 @@

 ?
 --EXPECTF--
-open: path = /, name = sid
+open: path = /tmp, name = sid
 read: id = %s
 gc: maxlifetime = %d
 write: id = %s, data = A|s:1:B;
 close
-open: path = /, name = sid
+open: path = /tmp, name = sid
 read: id = %s
 gc: maxlifetime = %d
 destroy: id = %s
 close
-open: path = /, name = sid
+open: path = /tmp, name = sid
 read: id = %s
 gc: maxlifetime = %d
 write: id = %s, data = E|s:1:F;

Modified: php/php-src/branches/PHP_5_4/ext/session/tests/bug32330.phpt
===
--- php/php-src/branches/PHP_5_4/ext/session/tests/bug32330.phpt
2011-06-09 08:21:28 UTC (rev 311964)
+++ php/php-src/branches/PHP_5_4/ext/session/tests/bug32330.phpt
2011-06-09 08:24:12 UTC (rev 311965)
@@ -6,7 +6,7 @@
 session.use_trans_sid=0
 session.use_cookies=1
 session.name=sid
-session.save_path=/
+session.save_path=/tmp
 session.gc_probability=1
 session.gc_divisor=1
 --FILE--
@@ -68,17 +68,17 @@

 ?
 --EXPECTF--
-open: path = /, name = sid
+open: path = /tmp, name = sid
 read: id = %s
 gc: maxlifetime = %d
 write: id = %s, data = A|s:1:B;
 close
-open: path = /, name = sid
+open: path = /tmp, name = sid
 read: id = %s
 gc: maxlifetime = %d
 destroy: id = %s
 close
-open: path = /, name = sid
+open: path = /tmp, name = sid
 read: id = %s
 gc: maxlifetime = %d
 write: id = %s, data = E|s:1:F;

Modified: php/php-src/trunk/ext/session/tests/bug32330.phpt
===
--- php/php-src/trunk/ext/session/tests/bug32330.phpt   2011-06-09 08:21:28 UTC 
(rev 311964)
+++ php/php-src/trunk/ext/session/tests/bug32330.phpt   2011-06-09 08:24:12 UTC 
(rev 311965)
@@ -6,7 +6,7 @@
 session.use_trans_sid=0
 session.use_cookies=1
 session.name=sid
-session.save_path=/
+session.save_path=/tmp
 session.gc_probability=1
 session.gc_divisor=1
 --FILE--
@@ -68,17 +68,17 @@

 ?
 --EXPECTF--
-open: path = /, name = sid
+open: path = /tmp, name = sid
 read: id = %s
 gc: maxlifetime = %d
 write: id = %s, data = A|s:1:B;
 close
-open: path = /, name = sid
+open: path = /tmp, name = sid
 read: id = %s
 gc: maxlifetime = %d
 destroy: id = %s
 close
-open: path = /, name = sid
+open: path = /tmp, name = sid
 read: id = %s
 gc: maxlifetime = %d
 write: id = %s, data = E|s:1:F;

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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/session/tests/ 008-php4.2.3.phpt

2011-06-09 Thread Shein Alexey
sheinThu, 09 Jun 2011 13:09:25 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=311975

Log:
Fixed test.

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/session/tests/008-php4.2.3.phpt

Modified: php/php-src/branches/PHP_5_3/ext/session/tests/008-php4.2.3.phpt
===
--- php/php-src/branches/PHP_5_3/ext/session/tests/008-php4.2.3.phpt
2011-06-09 12:13:04 UTC (rev 311974)
+++ php/php-src/branches/PHP_5_3/ext/session/tests/008-php4.2.3.phpt
2011-06-09 13:09:25 UTC (rev 311975)
@@ -15,7 +15,6 @@
 log_errors=0
 html_errors=0
 display_errors=1
-error_reporting=2039;
 session.serialize_handler=php
 session.save_handler=files
 precision=14
@@ -59,12 +58,18 @@
 ?
 --EXPECTF--
 Deprecated: Directive 'register_long_arrays' is deprecated in PHP 5.3 and 
greater in Unknown on line 0
+
+Deprecated: Function session_register() is deprecated in %s on line %d
+
+Notice: Undefined variable: c in %s on line %d
 NULL
 session_write_close(): Your script possibly relies on a session side-effect 
which existed until PHP 4.2.3. Please be advised that the session extension 
does not consider global variables as a source of data, unless register_globals 
is enabled. You can disable this functionality and this warning by setting 
session.bug_compat_42 or session.bug_compat_warn to off, respectively
 array(1) {
   [c]=
   float(3.14)
 }
+
+Notice: Undefined variable: c in %s on line %d
 NULL
 array(1) {
   [c]=

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/curl/tests/curl_setopt_basic001.phpt trunk/ext/curl/tests/curl_setopt_basic001.phpt

2011-05-31 Thread Shein Alexey
sheinTue, 31 May 2011 12:45:00 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=311663

Log:
Removed test since there's no more safe_mode in PHP = 5.4.

Changed paths:
D   php/php-src/branches/PHP_5_4/ext/curl/tests/curl_setopt_basic001.phpt
D   php/php-src/trunk/ext/curl/tests/curl_setopt_basic001.phpt

Deleted: php/php-src/branches/PHP_5_4/ext/curl/tests/curl_setopt_basic001.phpt
===
--- php/php-src/branches/PHP_5_4/ext/curl/tests/curl_setopt_basic001.phpt   
2011-05-31 12:05:25 UTC (rev 311662)
+++ php/php-src/branches/PHP_5_4/ext/curl/tests/curl_setopt_basic001.phpt   
2011-05-31 12:45:00 UTC (rev 311663)
@@ -1,35 +0,0 @@
---TEST--
-curl_setopt basic tests.
---CREDITS--
-Paul Sohier
-#phptestfest utrecht
---INI--
-safe_mode=On
---SKIPIF--
-?php if (!extension_loaded(curl) || false === 
getenv('PHP_CURL_HTTP_REMOTE_SERVER') || PHP_VERSION_ID  503099) print skip; 
?
---FILE--
-?php
-
-$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
-
-// start testing
-echo *** Testing curl_setopt with CURLOPT_FOLLOWLOCATION in safemode\n;
-
-$url = {$host}/;
-$ch = curl_init();
-
-ob_start(); // start output buffering
-curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
-
-$curl_content = curl_exec($ch);
-curl_close($ch);
-
-var_dump( $curl_content );
-?
---EXPECTF--
-Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in 
Unknown on line 0
-*** Testing curl_setopt with CURLOPT_FOLLOWLOCATION in safemode
-
-Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when 
safe_mode is enabled or an open_basedir is set in %s on line %d
-bool(false)
-

Deleted: php/php-src/trunk/ext/curl/tests/curl_setopt_basic001.phpt
===
--- php/php-src/trunk/ext/curl/tests/curl_setopt_basic001.phpt  2011-05-31 
12:05:25 UTC (rev 311662)
+++ php/php-src/trunk/ext/curl/tests/curl_setopt_basic001.phpt  2011-05-31 
12:45:00 UTC (rev 311663)
@@ -1,35 +0,0 @@
---TEST--
-curl_setopt basic tests.
---CREDITS--
-Paul Sohier
-#phptestfest utrecht
---INI--
-safe_mode=On
---SKIPIF--
-?php if (!extension_loaded(curl) || false === 
getenv('PHP_CURL_HTTP_REMOTE_SERVER') || PHP_VERSION_ID  503099) print skip; 
?
---FILE--
-?php
-
-$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
-
-// start testing
-echo *** Testing curl_setopt with CURLOPT_FOLLOWLOCATION in safemode\n;
-
-$url = {$host}/;
-$ch = curl_init();
-
-ob_start(); // start output buffering
-curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
-
-$curl_content = curl_exec($ch);
-curl_close($ch);
-
-var_dump( $curl_content );
-?
---EXPECTF--
-Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in 
Unknown on line 0
-*** Testing curl_setopt with CURLOPT_FOLLOWLOCATION in safemode
-
-Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when 
safe_mode is enabled or an open_basedir is set in %s on line %d
-bool(false)
-

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/curl/tests/bug48207.phpt branches/PHP_5_4/ext/curl/tests/bug48207.phpt trunk/ext/curl/tests/bug48207.phpt

2011-05-31 Thread Shein Alexey
sheinTue, 31 May 2011 12:57:40 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=311664

Log:
Fixed notice breaking the test.

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/curl/tests/bug48207.phpt
U   php/php-src/branches/PHP_5_4/ext/curl/tests/bug48207.phpt
U   php/php-src/trunk/ext/curl/tests/bug48207.phpt

Modified: php/php-src/branches/PHP_5_3/ext/curl/tests/bug48207.phpt
===
--- php/php-src/branches/PHP_5_3/ext/curl/tests/bug48207.phpt   2011-05-31 
12:45:00 UTC (rev 311663)
+++ php/php-src/branches/PHP_5_3/ext/curl/tests/bug48207.phpt   2011-05-31 
12:57:40 UTC (rev 311664)
@@ -18,7 +18,7 @@
 if(!empty($host)) {

 // Use the set Environment variable
-$url = $host/get.php;
+$url = $host/get.php?test=1;

 } else {


Modified: php/php-src/branches/PHP_5_4/ext/curl/tests/bug48207.phpt
===
--- php/php-src/branches/PHP_5_4/ext/curl/tests/bug48207.phpt   2011-05-31 
12:45:00 UTC (rev 311663)
+++ php/php-src/branches/PHP_5_4/ext/curl/tests/bug48207.phpt   2011-05-31 
12:57:40 UTC (rev 311664)
@@ -18,7 +18,7 @@
 if(!empty($host)) {

 // Use the set Environment variable
-$url = $host/get.php;
+$url = $host/get.php?test=1;

 } else {


Modified: php/php-src/trunk/ext/curl/tests/bug48207.phpt
===
--- php/php-src/trunk/ext/curl/tests/bug48207.phpt  2011-05-31 12:45:00 UTC 
(rev 311663)
+++ php/php-src/trunk/ext/curl/tests/bug48207.phpt  2011-05-31 12:57:40 UTC 
(rev 311664)
@@ -18,7 +18,7 @@
 if(!empty($host)) {

 // Use the set Environment variable
-$url = $host/get.php;
+$url = $host/get.php?test=1;

 } else {


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