diff options
| author | Dmitry Stogov <dmitry@php.net> | 2007-04-18 14:51:29 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2007-04-18 14:51:29 +0000 |
| commit | b2785c3d4c60c07d72623eba8d325f0b37247ae2 (patch) | |
| tree | 15c67cc415dc5d1cc9c1d773c304797dd38a0627 | |
| parent | 41d27878dee99910f7a0377a0b3a2ae0e5d456c3 (diff) | |
| download | php-git-b2785c3d4c60c07d72623eba8d325f0b37247ae2.tar.gz | |
Fixed tests (win32)
| -rw-r--r-- | ext/standard/tests/file/bug22414.phpt | 9 | ||||
| -rw-r--r-- | ext/standard/tests/file/bug24313.phpt | 6 | ||||
| -rw-r--r-- | ext/standard/tests/file/bug26615.phpt | 6 | ||||
| -rw-r--r-- | ext/standard/tests/file/bug26938.phpt | 21 | ||||
| -rwxr-xr-x | ext/standard/tests/file/bug39367.phpt | 6 | ||||
| -rw-r--r-- | ext/standard/tests/file/mkdir-002.phpt | 6 | ||||
| -rw-r--r-- | ext/standard/tests/file/stream_001.phpt | 2 | ||||
| -rw-r--r-- | ext/standard/tests/strings/pathinfo.phpt | 14 | ||||
| -rwxr-xr-x | ext/standard/tests/time/bug38524.phpt | 2 |
9 files changed, 55 insertions, 17 deletions
diff --git a/ext/standard/tests/file/bug22414.phpt b/ext/standard/tests/file/bug22414.phpt index 0775fc8a7a..b60b865e74 100644 --- a/ext/standard/tests/file/bug22414.phpt +++ b/ext/standard/tests/file/bug22414.phpt @@ -16,8 +16,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-- +<?php +if (substr(PHP_OS, 0, 3) == 'WIN') { + die('skip "/dev" is not available'); +} +?> --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 <?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-- 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-- +<?php +if (substr(PHP_OS, 0, 3) == 'WIN') { + die('skip no symlinks on Windows'); +} +?> --FILE-- <?php function test() { diff --git a/ext/standard/tests/file/mkdir-002.phpt b/ext/standard/tests/file/mkdir-002.phpt index bc4f19acae..ccfd6c3d74 100644 --- a/ext/standard/tests/file/mkdir-002.phpt +++ b/ext/standard/tests/file/mkdir-002.phpt @@ -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 diff --git a/ext/standard/tests/file/stream_001.phpt b/ext/standard/tests/file/stream_001.phpt index 8a3f03409b..6df43471ea 100644 --- a/ext/standard/tests/file/stream_001.phpt +++ b/ext/standard/tests/file/stream_001.phpt @@ -17,7 +17,7 @@ Notice: fopen(): Unable to find the wrapper "file" - did you forget to enable it 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) diff --git a/ext/standard/tests/strings/pathinfo.phpt b/ext/standard/tests/strings/pathinfo.phpt index c1d58f05b3..d9c3a2ed6c 100644 --- a/ext/standard/tests/strings/pathinfo.phpt +++ b/ext/standard/tests/strings/pathinfo.phpt @@ -57,7 +57,7 @@ array(4) { } array(3) { ["dirname"]=> - 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,13 +96,13 @@ 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 diff --git a/ext/standard/tests/time/bug38524.phpt b/ext/standard/tests/time/bug38524.phpt index e9ccaaf38a..77d0f4f234 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-- +<?php if (!function_exists('strptime')) echo "SKIP"; ?> --FILE-- <?php var_dump(strptime('2006-08-20', '%Y-%m-%d')); |
