]> granicus.if.org Git - php/commitdiff
Move and fix scandir related bug test
authorGeorge Peter Banyard <girgias@php.net>
Wed, 28 Aug 2019 23:35:29 +0000 (01:35 +0200)
committerJoe Watkins <krakjoe@php.net>
Fri, 30 Aug 2019 07:50:04 +0000 (09:50 +0200)
ext/standard/tests/dir/bug41693.phpt [new file with mode: 0644]
ext/standard/tests/file/bug41693.phpt [deleted file]

diff --git a/ext/standard/tests/dir/bug41693.phpt b/ext/standard/tests/dir/bug41693.phpt
new file mode 100644 (file)
index 0000000..c42ca2f
--- /dev/null
@@ -0,0 +1,14 @@
+--TEST--
+Bug #41693 (scandir() allows empty directory names)
+--FILE--
+<?php
+
+try {
+    var_dump(scandir(''));
+} catch (\Error $e) {
+    echo $e->getMessage() . "\n";
+}
+
+?>
+--EXPECT--
+Directory name cannot be empty
diff --git a/ext/standard/tests/file/bug41693.phpt b/ext/standard/tests/file/bug41693.phpt
deleted file mode 100644 (file)
index ea074fa..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---TEST--
-Bug #41693 (scandir() allows empty directory names)
---FILE--
-<?php
-
-var_dump(scandir(''));
-
-echo "Done\n";
-?>
---EXPECTF--
-Warning: scandir(): Directory name cannot be empty in %s on line %d
-bool(false)
-Done