]> granicus.if.org Git - php/commitdiff
MFB: skip tests on systems without fnmatch() function (f.e.: old darwin)
authorAlexey Zakhlestin <indeyets@php.net>
Tue, 21 Oct 2008 13:38:57 +0000 (13:38 +0000)
committerAlexey Zakhlestin <indeyets@php.net>
Tue, 21 Oct 2008 13:38:57 +0000 (13:38 +0000)
ext/standard/tests/file/fnmatch_basic.phpt
ext/standard/tests/file/fnmatch_error.phpt
ext/standard/tests/file/fnmatch_variation.phpt

index 76fdf9ed6daa512c1685e9d61f99d144c14658ca..9f8f4dbb4d67433a85602a8e08dddbe813d2a301 100644 (file)
@@ -2,8 +2,11 @@
 Test fnmatch() function: Basic functionality
 --SKIPIF--
 <?php
-if(substr(PHP_OS, 0, 3) == 'WIN')
-  die("skip do not run on Windows");
+if (substr(PHP_OS, 0, 3) == 'WIN')
+    die("skip do not run on Windows");
+
+if (!function_exists('fnmatch'))
+    die("skip fnmatch() function is not available");
 ?>
 --FILE--
 <?php
index 87505738e2acf5df5dafa598c30c8ddb8e98cc25..77a2a386e599d90f44dbed9014030623ec5b3a29 100644 (file)
@@ -2,8 +2,11 @@
 Test fnmatch() function: Error conditions
 --SKIPIF--
 <?php
-if(substr(PHP_OS, 0, 3) == 'WIN')
-  die("skip do not run on Windows");
+if (substr(PHP_OS, 0, 3) == 'WIN')
+    die("skip do not run on Windows");
+
+if (!function_exists('fnmatch'))
+    die("skip fnmatch() function is not available");
 ?>
 --FILE--
 <?php
index 008d4d5ab427651c27474054ebe91e7c8955214d..34cc0b8e4cf665043ce9dbc3afb335e6fb93c3fa 100644 (file)
@@ -2,8 +2,11 @@
 Test fnmatch() function: Variations
 --SKIPIF--
 <?php
-if(substr(PHP_OS, 0, 3) == 'WIN')
-  die("skip do not run on Windows");
+if (substr(PHP_OS, 0, 3) == 'WIN')
+    die("skip do not run on Windows");
+
+if (!function_exists('fnmatch'))
+    die("skip fnmatch() function is not available");
 ?>
 --FILE--
 <?php