]> granicus.if.org Git - php/commitdiff
add new test by Pierre
authorAntony Dovgal <tony2001@php.net>
Thu, 19 Oct 2006 12:07:07 +0000 (12:07 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 19 Oct 2006 12:07:07 +0000 (12:07 +0000)
ext/standard/tests/file/mkdir-006.phpt [new file with mode: 0644]

diff --git a/ext/standard/tests/file/mkdir-006.phpt b/ext/standard/tests/file/mkdir-006.phpt
new file mode 100644 (file)
index 0000000..5bfa8e8
--- /dev/null
@@ -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.