From: Dmitry Stogov Date: Wed, 18 Apr 2007 14:51:47 +0000 (+0000) Subject: Fixed tests (win32) X-Git-Tag: RELEASE_1_2_0~281 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fbccef91d724f2350114b7966118d1ebaea14c62;p=php Fixed tests (win32) --- diff --git a/ext/standard/tests/file/bug22414.phpt b/ext/standard/tests/file/bug22414.phpt index e1f9a5c025..a120fa54b5 100644 --- a/ext/standard/tests/file/bug22414.phpt +++ b/ext/standard/tests/file/bug22414.phpt @@ -15,8 +15,13 @@ output_handler= /* 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)) { diff --git a/ext/standard/tests/file/bug24313.phpt b/ext/standard/tests/file/bug24313.phpt index 04057c58a3..e5bceee856 100644 --- a/ext/standard/tests/file/bug24313.phpt +++ b/ext/standard/tests/file/bug24313.phpt @@ -1,5 +1,11 @@ --TEST-- Bug #24313 (file_exists() throws a warning on nonexistent files when is open_basedir enabled) +--SKIPIF-- + --INI-- open_basedir=/dev --FILE-- diff --git a/ext/standard/tests/file/bug26615.phpt b/ext/standard/tests/file/bug26615.phpt index 34d71e4b38..4de8b4a463 100644 --- a/ext/standard/tests/file/bug26615.phpt +++ b/ext/standard/tests/file/bug26615.phpt @@ -6,7 +6,11 @@ variables_order=E --EXPECT-- diff --git a/ext/standard/tests/file/bug26938.phpt b/ext/standard/tests/file/bug26938.phpt index 8e059ee840..c43e6b1033 100644 --- a/ext/standard/tests/file/bug26938.phpt +++ b/ext/standard/tests/file/bug26938.phpt @@ -5,12 +5,21 @@ Bug #26938 (exec does not read consecutive long lines correctly) $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"; diff --git a/ext/standard/tests/file/bug39367.phpt b/ext/standard/tests/file/bug39367.phpt index 667e33dca1..01fb5e8c84 100755 --- a/ext/standard/tests/file/bug39367.phpt +++ b/ext/standard/tests/file/bug39367.phpt @@ -1,5 +1,11 @@ --TEST-- Bug #39367 (clearstatcache() doesn't clear realpath cache) +--SKIPIF-- + --FILE-- --FILE-- - string(1) "/" + string(1) "%e" ["basename"]=> string(0) "" ["filename"]=> @@ -75,7 +75,7 @@ array(4) { } array(4) { ["dirname"]=> - string(1) "/" + string(1) "%e" ["basename"]=> string(1) "." ["extension"]=> @@ -96,15 +96,15 @@ array(4) { 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(4) { } array(3) { [u"dirname"]=> - unicode(1) "/" + unicode(1) "%e" [u"basename"]=> unicode(0) "" [u"filename"]=> @@ -155,7 +155,7 @@ array(4) { } array(4) { [u"dirname"]=> - unicode(1) "/" + unicode(1) "%e" [u"basename"]=> unicode(1) "." [u"extension"]=> @@ -176,13 +176,13 @@ array(4) { 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 diff --git a/ext/standard/tests/time/bug38524.phpt b/ext/standard/tests/time/bug38524.phpt index a604476422..efdc5ee23e 100755 --- a/ext/standard/tests/time/bug38524.phpt +++ b/ext/standard/tests/time/bug38524.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #38524 (strptime() does not initialize the internal date storage structure) +--SKIPIF-- + --FILE--