]> granicus.if.org Git - php/commitdiff
Add skipifs to some mb path tests
authorAnatol Belski <ab@php.net>
Fri, 2 Sep 2016 17:37:31 +0000 (19:37 +0200)
committerAnatol Belski <ab@php.net>
Fri, 2 Sep 2016 17:46:32 +0000 (19:46 +0200)
These were invented primarily to test the multibyte path handling
patch on Windows. How it turns out by PR #2105, some test issues
on some filesystems are possible. Particularly HFS is configurable
to use different ways to save filenames, see
https://developer.apple.com/library/mac/qa/qa1173/_index.html
This makes it impossible to test the filenames byte wise, while
the results are still correct. There are still several other tests
using UTF-8 file names spread over other extensions. So far no
false positives are to see, they don't need to be touched.

32 files changed:
ext/standard/tests/dir/chdir_basic-win32-mb.phpt
ext/standard/tests/dir/chdir_error2-win32-mb.phpt
ext/standard/tests/dir/chdir_variation1-win32-mb.phpt
ext/standard/tests/dir/chdir_variation2-win32-mb.phpt
ext/standard/tests/dir/closedir_basic-win32-mb.phpt
ext/standard/tests/dir/closedir_error-win32-mb.phpt
ext/standard/tests/dir/closedir_variation2-win32-mb.phpt
ext/standard/tests/dir/dir_basic-win32-mb.phpt
ext/standard/tests/dir/dir_variation2-win32-mb.phpt
ext/standard/tests/dir/dir_variation4-win32-mb.phpt
ext/standard/tests/dir/getcwd_basic-win32-mb.phpt
ext/standard/tests/dir/opendir_basic-win32-mb.phpt
ext/standard/tests/dir/opendir_error1-win32-mb.phpt
ext/standard/tests/dir/opendir_variation2-win32-mb.phpt
ext/standard/tests/dir/opendir_variation3-win32-mb.phpt
ext/standard/tests/dir/opendir_variation4-win32-mb.phpt
ext/standard/tests/dir/readdir_basic-win32-mb.phpt
ext/standard/tests/dir/readdir_error-win32-mb.phpt
ext/standard/tests/dir/readdir_variation2-win32-mb.phpt
ext/standard/tests/dir/readdir_variation3-win32-mb.phpt
ext/standard/tests/dir/readdir_variation4-win32-mb.phpt
ext/standard/tests/dir/readdir_variation6-win32-mb.phpt
ext/standard/tests/dir/rewinddir_basic-win32-mb.phpt
ext/standard/tests/dir/rewinddir_error-win32-mb.phpt
ext/standard/tests/dir/rewinddir_variation2-win32-mb.phpt
ext/standard/tests/dir/scandir_basic-win32-mb.phpt
ext/standard/tests/dir/scandir_error1-win32-mb.phpt
ext/standard/tests/dir/scandir_variation10-win32-mb.phpt
ext/standard/tests/dir/scandir_variation3-win32-mb.phpt
ext/standard/tests/dir/scandir_variation4-win32-mb.phpt
ext/standard/tests/dir/scandir_variation8-win32-mb.phpt
ext/standard/tests/dir/scandir_variation9-win32-mb.phpt

index db08d51f40d418d9ff79e6f441ce62ec393c6470..8d5b2ff9863110e0fe4b9e3fe1a26bb7632bc090 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test chdir() function : basic functionality 
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : bool chdir(string $directory)
index a1f08939ed07293cb3d57a29a86b66f9b8337970..2b23c90644508e24baba8912df5afd40d3693bdd 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test chdir() function : error conditions - Non-existent directory
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : bool chdir(string $directory)
index 04fbc0bc18d282cba0c745eb00c27562ef14ab04..90402f4c4946f14b21a968873ecf5651e6a24578 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test chdir() function : usage variations - different data type as $directory arg
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : bool chdir(string $directory)
index ad1f6b665a87993ecfe9efcccd60f7164020203d..f28d57ab4f6fdec3b6228bac8192f0efe28d31eb 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test chdir() function : usage variations - relative paths
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : bool chdir(string $directory)
index 4a871dbe74a098fa2a313bc45adb3221264c46c2..2602e292ff67d3115c8c8509199a48d4cb7dbe34 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test closedir() function : basic functionality 
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : void closedir([resource $dir_handle])
index 15e646e124bd1d06866a73877ef2e17d51c46ce7..04c614e33df83474e93d8aa7859c42fe84fdfca7 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test closedir() function : error conditions - Pass incorrect number of arguments
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : void closedir([resource $dir_handle])
index f166bd9f0d9097ff57a8b669ec7fca8d61c0c147..26b4a5b8b70f9f3b375db7d000e5668553195199 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test closedir() function : usage variations - close directory handle twice
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : void closedir([resource $dir_handle])
index a491d23abc7f30fb6e1706981d6906d1cae96d47..d562c0b7e30f6858385655c0f6c0478e040f0fd6 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test dir() function : basic functionality
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* 
index 35f63cb649de660c740acb61ef067a08bebc8041..a2d482f43ea285e7f0beb36dcf3014cd24cd5da9 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test dir() function : usage variations - unexpected value for 'context' argument
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* 
index c5bd263f7b559d29ad706ee5e706b94d8e612817..156b83656223629d3d9860586252f4bb9638666c 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test dir() function : usage variations - operate on previously opened directory
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* 
index 8a0095904932dd6782eb91f32573690144ff911e..7ebbaa470fbf86e7f38fe8112da443abb16dc4bc 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test getcwd() function : basic functionality
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : mixed getcwd(void)
index 0c94c250beffdab10f4fcaaf2bc224146d675370..f9d06bfdb7df4c38f746635cd1d6b1673f32a5d2 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test opendir() function : basic functionality 
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : mixed opendir(string $path[, resource $context])
index 71d07073ae395d491d9bad33516b308f2c165695..e363de48069829f7c6c296608d138ae5895f676a 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test opendir() function : error conditions - Incorrect number of args
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : mixed opendir(string $path[, resource $context])
index e82d32ee5f3223fa11f4597a3cfb7377acb80bb2..3d54638e0dfaa3b7ed653c36a27623bdbd36c1cf 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test opendir() function : usage variations - different data types as $context arg
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : mixed opendir(string $path[, resource $context])
index af6d4fb1b4895e1c337de7ca51d09c24f14583cf..74d0a6b98288c8661bc3aa1dc4ed6a4083479253 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test opendir() function : usage variations - open a directory twice
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : mixed opendir(string $path[, resource $context])
index 11ededf573e4feea5f64408383992df1aebdce53..901b13c4a8b3048e44e39ccc4dd3675c9a39c263 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test opendir() function : usage variations - different relative paths
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : mixed opendir(string $path[, resource $context])
index 36f96604e102ccc8c7e6510099fc9535b3a24af3..90cb81a27d7fd1708112fb095a3b2527f113f82a 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test readdir() function : basic functionality 
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : string readdir([resource $dir_handle])
index 511d74c6423054f50e687751858c0be3efd85317..1388987259697465a8812d93c088520148555857 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test readdir() function : error conditions - Incorrect number of args
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : string readdir([resource $dir_handle])
index 59ea129e2ea73a46adf8e559e76e2228e5a5e1dd..bde6d6f1c80cdc2acafed74938e3f72dd228dad1 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test readdir() function : usage variations - empty directories
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : string readdir([resource $dir_handle])
index c2bc84949e04d423bbf26e33519988414ec629bb..a00e83769fd34f55d83368a9007b078d7cd7f2ed 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test readdir() function : usage variations - sub-directories 
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : string readdir([resource $dir_handle])
index e8c4ff224ccf230f96c59455bee8648b2bb4a787..6540d8e571f1081b3acbbccbfdc6ea4229914dcb 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test readdir() function : usage variations - different file names
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : string readdir([resource $dir_handle])
index 4faadcaf861afb7c0b283b01971fd465821a7999..db5de28302706db82c7b319bb1db202e8f8f3409 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test readdir() function : usage variations - operate on previously opened directory
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : string readdir([resource $dir_handle])
index e1f134a7071db956cee014fcb61eb0e3836073ac..bec721d3c56ddfa50f1048e623cb0a4d00c26899 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test rewinddir() function : basic functionality 
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : void rewinddir([resource $dir_handle])
index d78271e0f651aaad80e2f7d4c1e6799a31267407..bc107704a087837bd3befce379212d064f940b37 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test rewinddir() function : error conditions - incorrect number of args
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : void rewinddir([resource $dir_handle])
index 71d40f1147d18ede95b3bc5c1cdae92b12dac9e6..a3f5e8ecc9b576da2c088a6eec1417a1ef89d5d6 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test rewinddir() function : usage variations - operate on a closed directory
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : void rewinddir([resource $dir_handle])
index ca99cf0ada052b7c903f604dd7ef2cbafe4d403f..a089a0afa3d5f583ed1a3f80c66c43142d5c9566 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test scandir() function : basic functionality 
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : array scandir(string $dir [, int $sorting_order [, resource $context]])
index b0ed08a20d0e73e2f724fc5590fd6196a2804425..6c1ce72a445e469c4a3b2a2c11d861c0438531a4 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test scandir() function : error conditions - Incorrect number of args
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : array scandir(string $dir [, int $sorting_order [, resource $context]])
index 435a710fbca1e36c234b77fe6a485f2dacc752ea..b031a91505bc7975dd7d86362a5df16c4dcf6933 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test scandir() function : usage variations - different sorting constants
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : array scandir(string $dir [, int $sorting_order [, resource $context]])
index c6eae7cae1cc14b8f820f10968c3661f2053cfaf..c2b2ed5a179eecd93f471a8a940e70f1dab4cd4a 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test scandir() function : usage variations - diff data types as $context arg
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : array scandir(string $dir [, int $sorting_order [, resource $context]])
index 8090a276b7685deb2cedfe00bdb6ee2a041621e3..4c85dd75cf6bb120981187041239f17a5916dc18 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test scandir() function : usage variations - different relative paths
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : array scandir(string $dir [, int $sorting_order [, resource $context]])
index 7ae165fd92dd4f13be9cf49ed859412a5817ff0f..f30645da45da269f4556d15c811a7c2d1101a15d 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test scandir() function : usage variations - different file names
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : array scandir(string $dir [, int $sorting_order [, resource $context]])
index b4e1aee2826104e05f842aa33950ba662fbd7ea9..686eca43a6fd092d1ba209a8f2a4ce0113676a18 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Test scandir() function : usage variations - different ints as $sorting_order arg
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
 --FILE--
 <?php
 /* Prototype  : array scandir(string $dir [, int $sorting_order [, resource $context]])