zoe             Fri Jan 23 09:43:35 2009 UTC

  Added files:                 (Branch: PHP_5_3)
    /php-src/ext/standard/tests/file    filetype_variation3.phpt 

  Modified files:              
    /php-src/ext/standard/tests/file    filetype_variation2.phpt 
  Log:
  fix tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/filetype_variation2.phpt?r1=1.1.4.2&r2=1.1.4.3&diff_format=u
Index: php-src/ext/standard/tests/file/filetype_variation2.phpt
diff -u php-src/ext/standard/tests/file/filetype_variation2.phpt:1.1.4.2 
php-src/ext/standard/tests/file/filetype_variation2.phpt:1.1.4.3
--- php-src/ext/standard/tests/file/filetype_variation2.phpt:1.1.4.2    Wed Nov 
26 10:10:17 2008
+++ php-src/ext/standard/tests/file/filetype_variation2.phpt    Fri Jan 23 
09:43:35 2009
@@ -1,5 +1,5 @@
 --TEST--
-Test filetype() function: Variations
+Test filetype() function: Check character type
 --CREDITS--
 Dave Kelsey <d_kel...@uk.ibm.com>
 --SKIPIF--
@@ -7,6 +7,8 @@
 if (substr(PHP_OS, 0, 3) == 'WIN') {
     die('skip no /dev on Windows');
 }
+if (!file_exists("/dev/console")) {
+    die('skip /dev/console not available);
 ?>
 --FILE--
 <?php
@@ -16,21 +18,11 @@
              dir, block, link, file, and unknown. 
 */
 
-echo "*** Testing filetype() with various types ***\n";
 echo "-- Checking for char --\n";
 print( filetype("/dev/console") )."\n";
-
-echo "-- Checking for block --\n";
-//we have cheated in our mac build by creating a ram0 block device.
-print( filetype("/dev/ram0") )."\n";
-
-echo "\n*** Done ***\n";
 ?>
+===DONE===
 --EXPECTF--
-*** Testing filetype() with various types ***
 -- Checking for char --
 char
--- Checking for block --
-block
-
-*** Done ***
+===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/filetype_variation3.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/file/filetype_variation3.phpt
+++ php-src/ext/standard/tests/file/filetype_variation3.phpt
--TEST--
Test filetype() function: Check block device
--CREDITS--
Dave Kelsey <d_kel...@uk.ibm.com>
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
    die('skip no /dev on Windows');
}
if (!file_exists("/dev/ram0")) {
    die('skip /dev/ram0 not available);
?>
--FILE--
<?php
/*
Prototype: string filetype ( string $filename );
Description: Returns the type of the file. Possible values are fifo, char,
             dir, block, link, file, and unknown. 
*/

echo "-- Checking for block --\n";
print( filetype("/dev/ram0") )."\n";
?>
===DONE===
--EXPECTF--
-- Checking for block --
block
===DONE===



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to