dmitry          Wed Apr 18 14:51:47 2007 UTC

  Modified files:              
    /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.12&r2=1.13&diff_format=u
Index: php-src/ext/standard/tests/file/bug22414.phpt
diff -u php-src/ext/standard/tests/file/bug22414.phpt:1.12 
php-src/ext/standard/tests/file/bug22414.phpt:1.13
--- php-src/ext/standard/tests/file/bug22414.phpt:1.12  Thu Aug 10 13:43:59 2006
+++ php-src/ext/standard/tests/file/bug22414.phpt       Wed Apr 18 14:51:47 2007
@@ -15,8 +15,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.6&r2=1.7&diff_format=u
Index: php-src/ext/standard/tests/file/bug24313.phpt
diff -u php-src/ext/standard/tests/file/bug24313.phpt:1.6 
php-src/ext/standard/tests/file/bug24313.phpt:1.7
--- php-src/ext/standard/tests/file/bug24313.phpt:1.6   Fri Jul 28 13:47:41 2006
+++ php-src/ext/standard/tests/file/bug24313.phpt       Wed Apr 18 14:51:47 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.5&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.5
--- 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:47 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.2&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.2
--- 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:47 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.2&r2=1.3&diff_format=u
Index: php-src/ext/standard/tests/file/bug39367.phpt
diff -u php-src/ext/standard/tests/file/bug39367.phpt:1.2 
php-src/ext/standard/tests/file/bug39367.phpt:1.3
--- php-src/ext/standard/tests/file/bug39367.phpt:1.2   Mon Jan 22 09:32:55 2007
+++ php-src/ext/standard/tests/file/bug39367.phpt       Wed Apr 18 14:51:47 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.2&r2=1.3&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.2 
php-src/ext/standard/tests/file/mkdir-002.phpt:1.3
--- php-src/ext/standard/tests/file/mkdir-002.phpt:1.2  Tue May 16 13:07:07 2006
+++ php-src/ext/standard/tests/file/mkdir-002.phpt      Wed Apr 18 14:51:47 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&r2=1.2&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 
php-src/ext/standard/tests/file/stream_001.phpt:1.2
--- php-src/ext/standard/tests/file/stream_001.phpt:1.1 Fri Sep 15 07:26:19 2006
+++ php-src/ext/standard/tests/file/stream_001.phpt     Wed Apr 18 14:51:47 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.2&r2=1.3&diff_format=u
Index: php-src/ext/standard/tests/strings/pathinfo.phpt
diff -u php-src/ext/standard/tests/strings/pathinfo.phpt:1.2 
php-src/ext/standard/tests/strings/pathinfo.phpt:1.3
--- php-src/ext/standard/tests/strings/pathinfo.phpt:1.2        Tue Aug  8 
09:23:11 2006
+++ php-src/ext/standard/tests/strings/pathinfo.phpt    Wed Apr 18 14:51:47 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,15 +96,15 @@
 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
 --UEXPECTF--
 Warning: pathinfo() expects at least 1 parameter, 0 given in %s on line %d
@@ -137,7 +137,7 @@
 }
 array(3) {
   [u"dirname"]=>
-  unicode(1) "/"
+  unicode(1) "%e"
   [u"basename"]=>
   unicode(0) ""
   [u"filename"]=>
@@ -155,7 +155,7 @@
 }
 array(4) {
   [u"dirname"]=>
-  unicode(1) "/"
+  unicode(1) "%e"
   [u"basename"]=>
   unicode(1) "."
   [u"extension"]=>
@@ -176,13 +176,13 @@
 unicode(12) "pathinfo.php"
 unicode(8) "pathinfo"
 unicode(3) "php"
-unicode(%d) "%s/strings"
-unicode(%d) "%s/strings"
+unicode(%d) "%s%estrings"
+unicode(%d) "%s%estrings"
 unicode(12) "pathinfo.php"
 unicode(3) "php"
 unicode(12) "pathinfo.php"
-unicode(%d) "%s/strings"
+unicode(%d) "%s%estrings"
 unicode(12) "pathinfo.php"
-unicode(%d) "%s/strings"
-unicode(%d) "%s/strings"
+unicode(%d) "%s%estrings"
+unicode(%d) "%s%estrings"
 Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/time/bug38524.phpt?r1=1.5&r2=1.6&diff_format=u
Index: php-src/ext/standard/tests/time/bug38524.phpt
diff -u php-src/ext/standard/tests/time/bug38524.phpt:1.5 
php-src/ext/standard/tests/time/bug38524.phpt:1.6
--- php-src/ext/standard/tests/time/bug38524.phpt:1.5   Wed Dec 27 19:17:02 2006
+++ php-src/ext/standard/tests/time/bug38524.phpt       Wed Apr 18 14:51:47 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

Reply via email to