]> granicus.if.org Git - php/commitdiff
fix tests
authorRaghubansh Kumar <kraghuba@php.net>
Tue, 4 Sep 2007 08:39:40 +0000 (08:39 +0000)
committerRaghubansh Kumar <kraghuba@php.net>
Tue, 4 Sep 2007 08:39:40 +0000 (08:39 +0000)
ext/standard/tests/file/copy_variation15.phpt
ext/standard/tests/file/copy_variation5.phpt
ext/standard/tests/file/copy_variation9.phpt
ext/standard/tests/file/fileowner_basic.phpt

index 402f41a5fc6fe0d5cdfff20c8aee5dc1a67d5637..481bee9fb985514f99a9df6f6897e80c60500980 100644 (file)
@@ -2,8 +2,8 @@
 Test copy() function: usage variations - destination dir access perms
 --SKIPIF--
 <?php
-if( (stristr(PHP_OS, "Mac")) || (substr(PHP_OS, 0, 3) == "WIN") )
-  die("skip do not run on Win/MacOS");
+if( (stristr(PHP_OS, "Darwin")) || (stristr(PHP_OS, "Win")) )
+  die("skip do not run on MacOS/Windows");
 // Skip if being run by root (files are always readable, writeable and executable)
 $filename = dirname(__FILE__)."/copy_variation15_root_check.tmp";
 $fp = fopen($filename, 'w');
index 9cf5b8f0429aa58efa4ccd203fd82475c7639821..acd78a30f5232ebf0501bf05a28f7fa85526ee48 100644 (file)
@@ -2,8 +2,8 @@
 Test copy() function: usage variations - destination file names(case sensitive)
 --SKIPIF--
 <?php
-if( (stristr(PHP_OS, "Mac")) || (substr(PHP_OS, 0, 3) == "WIN") )
-  die("skip do not run on Win/MacOS");
+if( (stristr(PHP_OS, "Darwin")) || (stristr(PHP_OS, "Win")) )
+  die("skip do not run on MacOS/Windows");
 ?>
 --FILE--
 <?php
index 8af4f7f14aaccbd6f836def9b5cea238bb821df0..5a2db1ee29ed32372375b62219b180f5e781104e 100644 (file)
@@ -2,8 +2,8 @@
 Test copy() function: usage variations - destination file access perms 
 --SKIPIF--
 <?php
-if( (stristr(PHP_OS, "Mac")) || (substr(PHP_OS, 0, 3) == "WIN") )
-  die("skip do not run on Win/MacOS");
+if( (stristr(PHP_OS, "Darwin")) || (stristr(PHP_OS, "Win")) )
+  die("skip do not run on MacOS/Windows");
 
 // Skip if being run by root (files are always readable, writeable and executable)
 $filename = dirname(__FILE__)."/copy_variation9_root_check.tmp";
index f3e9370a2ede118593839d71ba3f655ac12782cb..72e83971ae6d56e49a69f32cc8b2f95f86097c58 100644 (file)
@@ -1,10 +1,5 @@
 --TEST--
 Test fileowner() function: basic functionality
---SKIPIF--
-<?php
-if (!function_exists("posix_getpwuid")) {
-   die("skip no posix_getpwuid");
-}
 --FILE--
 <?php
 /* Prototype: int fileowner ( string $filename )
@@ -15,7 +10,7 @@ if (!function_exists("posix_getpwuid")) {
 echo "*** Testing fileowner(): basic functionality ***\n"; 
 
 echo "-- Testing with the file or directory created by owner --\n";
-var_dump( posix_getpwuid ( fileowner(__FILE__) ) );
+var_dump( fileowner(__FILE__) );
 var_dump( fileowner(".") );
 var_dump( fileowner("./..") );
 
@@ -32,12 +27,7 @@ $dir_name = $file_path."/fileowner_basic";
 mkdir($dir_name);
 var_dump( fileowner($dir_name) );
 
-echo "\n-- Testing with the standard file or directory --\n";
-var_dump( fileowner("/etc/passwd") );
-var_dump( fileowner("/etc") );
-var_dump( fileowner("/") );
-
-echo "\n*** Done ***\n";
+echo "*** Done ***\n";
 ?>
 
 --CLEAN--
@@ -52,63 +42,21 @@ rmdir($dir_name);
 --EXPECTF--
 *** Testing fileowner(): basic functionality ***
 -- Testing with the file or directory created by owner --
-array(7) {
-  ["name"]=>
-  string(%d) %s
-  ["passwd"]=>
-  string(%d) "%s"
-  ["uid"]=>
-  int(%d)
-  ["gid"]=>
-  int(%d)
-  ["gecos"]=>
-  string(%d) %s
-  ["dir"]=>
-  string(%d) %s
-  ["shell"]=>
-  string(%d) %s
-}
-int(%d)
 int(%d)
 int(%d)
 int(%d)
-
--- Testing with the standard file or directory --
-int(%d)
 int(%d)
 int(%d)
-
 *** Done ***
 
 --UEXPECTF--
 *** Testing fileowner(): basic functionality ***
 -- Testing with the file or directory created by owner --
-array(7) {
-  ["name"]=>
-  string(%d) %s
-  ["passwd"]=>
-  string(%d) "%s"
-  ["uid"]=>
-  int(%d)
-  ["gid"]=>
-  int(%d)
-  ["gecos"]=>
-  string(%d) %s
-  ["dir"]=>
-  string(%d) %s
-  ["shell"]=>
-  string(%d) %s
-}
 int(%d)
 int(%d)
-
-Notice: fwrite(): 26 character unicode buffer downcoded for binary stream runtime_encoding in %s on line %d
-int(%d)
 int(%d)
 
--- Testing with the standard file or directory --
-int(%d)
+Notice: fwrite(): 26 character unicode buffer downcoded for binary stream runtime_encoding in %s on line %d
 int(%d)
 int(%d)
-
 *** Done ***