]> granicus.if.org Git - php/commitdiff
is_executable() does not exist on Windows
authorKai Schroeder <k.schroeder@php.net>
Sun, 9 Feb 2003 13:18:13 +0000 (13:18 +0000)
committerKai Schroeder <k.schroeder@php.net>
Sun, 9 Feb 2003 13:18:13 +0000 (13:18 +0000)
ext/standard/tests/file/003-win32.phpt [new file with mode: 0644]
ext/standard/tests/file/003.phpt

diff --git a/ext/standard/tests/file/003-win32.phpt b/ext/standard/tests/file/003-win32.phpt
new file mode 100644 (file)
index 0000000..09940f0
--- /dev/null
@@ -0,0 +1,46 @@
+--TEST--
+is_*() and file_exists() return values are boolean.
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+    die('skip only for Windows');
+}
+?>
+--POST--
+--GET--
+--FILE--
+<?php
+
+$funcs = array(
+    'is_writable',
+    'is_readable',
+    'is_file',
+    'file_exists',
+);
+
+$filename="";
+
+foreach ($funcs as $test) {
+    $bb = $test($filename);
+    echo gettype($bb)."\n";
+    clearstatcache();
+}
+
+$filename="run-tests.php";
+
+foreach ($funcs as $test) {
+    $bb = $test($filename);
+    echo gettype($bb)."\n";
+    clearstatcache();
+}
+
+?>
+--EXPECT--
+boolean
+boolean
+boolean
+boolean
+boolean
+boolean
+boolean
+boolean
index 2b75bdccee1ce795bac725f0d0e1b0f0a95f5565..7de2cdca76980c10e1caf2930f0827c2d27f3c9e 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 is_*() and file_exists() return values are boolean.
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+  die('skip is_executable() does not exist on Windows');
+}
+?>
 --POST--
 --GET--
 --FILE--