dmitry Wed Apr 18 14:51:29 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/file bug22414.phpt bug24313.phpt
bug26615.phpt bug26938.phpt
bug39367.phpt mkdir-002.phpt
stream_001.phpt
/php-src/ext/standard/tests/strings pathinfo.phpt
/php-src/ext/standard/tests/time bug38524.phpt
Log:
Fixed tests (win32)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/bug22414.phpt?r1=1.10.6.1&r2=1.10.6.2&diff_format=u
Index: php-src/ext/standard/tests/file/bug22414.phpt
diff -u php-src/ext/standard/tests/file/bug22414.phpt:1.10.6.1
php-src/ext/standard/tests/file/bug22414.phpt:1.10.6.2
--- php-src/ext/standard/tests/file/bug22414.phpt:1.10.6.1 Thu Aug 10
13:43:18 2006
+++ php-src/ext/standard/tests/file/bug22414.phpt Wed Apr 18 14:51:29 2007
@@ -16,8 +16,13 @@
/* Binary Data Test */
- $cmd = $php . ' -n -r \"readfile(@getenv(\'TEST_PHP_EXECUTABLE\')); \"';
- $cmd = $php . ' -n -r \' passthru("'.$cmd.'"); \' > '.$tmpfile ;
+ if (substr(PHP_OS, 0, 3) != 'WIN') {
+ $cmd = $php . ' -n -r
\"readfile(@getenv(\'TEST_PHP_EXECUTABLE\')); \"';
+ $cmd = $php . ' -n -r \' passthru("'.$cmd.'"); \' > '.$tmpfile ;
+ } else {
+ $cmd = $php . ' -n -r
\"readfile(@getenv(\\\\\\"TEST_PHP_EXECUTABLE\\\\\\")); \"';
+ $cmd = $php . ' -n -r " passthru(\''.$cmd.'\');" > '.$tmpfile ;
+ }
exec($cmd);
if (md5_file($php) == md5_file($tmpfile)) {
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/bug24313.phpt?r1=1.3.4.1.2.2&r2=1.3.4.1.2.3&diff_format=u
Index: php-src/ext/standard/tests/file/bug24313.phpt
diff -u php-src/ext/standard/tests/file/bug24313.phpt:1.3.4.1.2.2
php-src/ext/standard/tests/file/bug24313.phpt:1.3.4.1.2.3
--- php-src/ext/standard/tests/file/bug24313.phpt:1.3.4.1.2.2 Fri Jul 28
13:47:56 2006
+++ php-src/ext/standard/tests/file/bug24313.phpt Wed Apr 18 14:51:29 2007
@@ -1,5 +1,11 @@
--TEST--
Bug #24313 (file_exists() throws a warning on nonexistent files when is
open_basedir enabled)
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip "/dev" is not available');
+}
+?>
--INI--
open_basedir=/dev
--FILE--
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/bug26615.phpt?r1=1.4&r2=1.4.4.1&diff_format=u
Index: php-src/ext/standard/tests/file/bug26615.phpt
diff -u php-src/ext/standard/tests/file/bug26615.phpt:1.4
php-src/ext/standard/tests/file/bug26615.phpt:1.4.4.1
--- php-src/ext/standard/tests/file/bug26615.phpt:1.4 Sat Jun 18 02:24:37 2005
+++ php-src/ext/standard/tests/file/bug26615.phpt Wed Apr 18 14:51:29 2007
@@ -6,7 +6,11 @@
<?php
$out = array();
$status = -1;
-exec($_ENV['TEST_PHP_EXECUTABLE'].' -r \'for($i=1;$i<=5000;$i++) print
"$i\n";\' | tr \'\n\' \' \'', $out, $status);
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ exec($_ENV['TEST_PHP_EXECUTABLE'].' -r \'for($i=1;$i<=5000;$i++) print
"$i\n";\' | tr \'\n\' \' \'', $out, $status);
+} else {
+ exec($_ENV['TEST_PHP_EXECUTABLE'].' -r "for($i=1;$i<=5000;$i++) echo
$i,\' \';"', $out, $status);
+}
print_r($out);
?>
--EXPECT--
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/bug26938.phpt?r1=1.1&r2=1.1.8.1&diff_format=u
Index: php-src/ext/standard/tests/file/bug26938.phpt
diff -u php-src/ext/standard/tests/file/bug26938.phpt:1.1
php-src/ext/standard/tests/file/bug26938.phpt:1.1.8.1
--- php-src/ext/standard/tests/file/bug26938.phpt:1.1 Wed Jan 21 22:48:28 2004
+++ php-src/ext/standard/tests/file/bug26938.phpt Wed Apr 18 14:51:29 2007
@@ -5,12 +5,21 @@
$out = array();
$status = -1;
$php = getenv('TEST_PHP_EXECUTABLE');
-exec($php . ' -r \''
- . '$lengths = array(10,20000,10000,5,10000,3);'
- . 'foreach($lengths as $length) {'
- . ' for($i=0;$i<$length;$i++) print chr(65+$i % 27);'
- . ' print "\n";'
- . '}\'', $out, $status);
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ exec($php . ' -r \''
+ . '$lengths = array(10,20000,10000,5,10000,3);'
+ . 'foreach($lengths as $length) {'
+ . ' for($i=0;$i<$length;$i++) print chr(65+$i % 27);'
+ . ' print "\n";'
+ . '}\'', $out, $status);
+} else {
+ exec($php . ' -r "'
+ . '$lengths = array(10,20000,10000,5,10000,3);'
+ . 'foreach($lengths as $length) {'
+ . ' for($i=0;$i<$length;$i++) print chr(65+$i % 27);'
+ . ' print \\"\\n\\";'
+ . '}"', $out, $status);
+}
for ($i=0;$i<6;$i++)
print "md5(line $i)= " . md5($out[$i]) . " (length " .
strlen($out[$i]) . ")\n";
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/bug39367.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
Index: php-src/ext/standard/tests/file/bug39367.phpt
diff -u php-src/ext/standard/tests/file/bug39367.phpt:1.1.2.1
php-src/ext/standard/tests/file/bug39367.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/bug39367.phpt:1.1.2.1 Mon Jan 22
09:31:46 2007
+++ php-src/ext/standard/tests/file/bug39367.phpt Wed Apr 18 14:51:29 2007
@@ -1,5 +1,11 @@
--TEST--
Bug #39367 (clearstatcache() doesn't clear realpath cache)
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip no symlinks on Windows');
+}
+?>
--FILE--
<?php
function test() {
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/mkdir-002.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
Index: php-src/ext/standard/tests/file/mkdir-002.phpt
diff -u php-src/ext/standard/tests/file/mkdir-002.phpt:1.1.2.1
php-src/ext/standard/tests/file/mkdir-002.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/mkdir-002.phpt:1.1.2.1 Tue May 16
13:06:06 2006
+++ php-src/ext/standard/tests/file/mkdir-002.phpt Wed Apr 18 14:51:29 2007
@@ -1,5 +1,11 @@
--TEST--
mkdir(dir, 0777) tests
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip no symlinks on Windows');
+}
+?>
--FILE--
<?php
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/stream_001.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/standard/tests/file/stream_001.phpt
diff -u php-src/ext/standard/tests/file/stream_001.phpt:1.1.2.2
php-src/ext/standard/tests/file/stream_001.phpt:1.1.2.3
--- php-src/ext/standard/tests/file/stream_001.phpt:1.1.2.2 Fri Sep 15
07:27:22 2006
+++ php-src/ext/standard/tests/file/stream_001.phpt Wed Apr 18 14:51:29 2007
@@ -17,7 +17,7 @@
Warning: fopen(): Plainfiles wrapper disabled in %s on line %d
-Warning: fopen(file:///%s): failed to open stream: no suitable wrapper could
be found in %s on line %d
+Warning: fopen(file://%s): failed to open stream: no suitable wrapper could be
found in %s on line %d
bool(false)
bool(true)
resource(%d) of type (stream)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/pathinfo.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/standard/tests/strings/pathinfo.phpt
diff -u php-src/ext/standard/tests/strings/pathinfo.phpt:1.1.2.2
php-src/ext/standard/tests/strings/pathinfo.phpt:1.1.2.3
--- php-src/ext/standard/tests/strings/pathinfo.phpt:1.1.2.2 Mon Jul 17
06:45:08 2006
+++ php-src/ext/standard/tests/strings/pathinfo.phpt Wed Apr 18 14:51:29 2007
@@ -57,7 +57,7 @@
}
array(3) {
["dirname"]=>
- string(1) "/"
+ string(1) "%e"
["basename"]=>
string(0) ""
["filename"]=>
@@ -75,7 +75,7 @@
}
array(4) {
["dirname"]=>
- string(1) "/"
+ string(1) "%e"
["basename"]=>
string(1) "."
["extension"]=>
@@ -96,13 +96,13 @@
string(12) "pathinfo.php"
string(8) "pathinfo"
string(3) "php"
-string(%d) "%s/strings"
-string(%d) "%s/strings"
+string(%d) "%s%estrings"
+string(%d) "%s%estrings"
string(12) "pathinfo.php"
string(3) "php"
string(12) "pathinfo.php"
-string(%d) "%s/strings"
+string(%d) "%s%estrings"
string(12) "pathinfo.php"
-string(%d) "%s/strings"
-string(%d) "%s/strings"
+string(%d) "%s%estrings"
+string(%d) "%s%estrings"
Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/time/bug38524.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/standard/tests/time/bug38524.phpt
diff -u php-src/ext/standard/tests/time/bug38524.phpt:1.1.2.2
php-src/ext/standard/tests/time/bug38524.phpt:1.1.2.3
--- php-src/ext/standard/tests/time/bug38524.phpt:1.1.2.2 Thu Aug 24
11:27:20 2006
+++ php-src/ext/standard/tests/time/bug38524.phpt Wed Apr 18 14:51:29 2007
@@ -1,5 +1,7 @@
--TEST--
Bug #38524 (strptime() does not initialize the internal date storage structure)
+--SKIPIF--
+<?php if (!function_exists('strptime')) echo "SKIP"; ?>
--FILE--
<?php
var_dump(strptime('2006-08-20', '%Y-%m-%d'));
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php