summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2006-10-19 12:07:07 +0000
committerAntony Dovgal <tony2001@php.net>2006-10-19 12:07:07 +0000
commit0cf7b1012f2c9c2a574d75af23b317e2e94a2b14 (patch)
treedf17f3401b6c4c3783c60120e9924e4755168dae
parent770b29803cb96542a59b0dfff9181e3907623a0e (diff)
downloadphp-git-0cf7b1012f2c9c2a574d75af23b317e2e94a2b14.tar.gz
add new test by Pierre
-rw-r--r--ext/standard/tests/file/mkdir-006.phpt26
1 files changed, 26 insertions, 0 deletions
diff --git a/ext/standard/tests/file/mkdir-006.phpt b/ext/standard/tests/file/mkdir-006.phpt
new file mode 100644
index 0000000000..5bfa8e8141
--- /dev/null
+++ b/ext/standard/tests/file/mkdir-006.phpt
@@ -0,0 +1,26 @@
+--TEST--
+recursive mkdir() with unclean paths
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ die('skip only for Windows');
+}
+?>
+--FILE--
+<?php
+chdir(dirname(__FILE__));
+$dirpath = "./tmp/foo//bar/logs";
+mkdir($dirpath, 0777, true);
+
+if (is_dir($dirpath)) {
+ echo "Ok.\n";
+} else {
+ echo "Failed.\n";
+}
+rmdir("./tmp/foo/bar/logs");
+rmdir("./tmp/foo/bar/");
+rmdir("./tmp/foo/");
+rmdir("./tmp/");
+?>
+--EXPECT--
+Ok.