summaryrefslogtreecommitdiff
path: root/_test/tests/inc/utf8_basename.test.php
diff options
context:
space:
mode:
Diffstat (limited to '_test/tests/inc/utf8_basename.test.php')
-rw-r--r--_test/tests/inc/utf8_basename.test.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/_test/tests/inc/utf8_basename.test.php b/_test/tests/inc/utf8_basename.test.php
index 1cb5b5606..1544e9915 100644
--- a/_test/tests/inc/utf8_basename.test.php
+++ b/_test/tests/inc/utf8_basename.test.php
@@ -59,6 +59,28 @@ class utf8_basename_test extends DokuWikiTest {
array('\\this\\foo\\ДокуВики.test.Вик', '.Вик', 'ДокуВики.test'),
array('/this\\foo/ДокуВики.test.Вик', '.Вик', 'ДокуВики.test'),
array('/this/foo\\ДокуВики.test.Вик', '.Вик', 'ДокуВики.test'),
+
+ array('bar.test.png', '', 'bar.test.png'),
+ array('bar.test.png', '.png', 'bar.test'),
+
+ array('/bar.test.png', '', 'bar.test.png'),
+ array('/bar.test.png', '.png', 'bar.test'),
+ array('\\bar.test.png', '', 'bar.test.png'),
+ array('\\bar.test.png', '.png', 'bar.test'),
+ array('\\/bar.test.png', '', 'bar.test.png'),
+ array('\\/bar.test.png', '.png', 'bar.test'),
+ array('/\\bar.test.png', '', 'bar.test.png'),
+ array('/\\bar.test.png', '.png', 'bar.test'),
+
+ // PHP's basename does this too:
+ array('foo/', '', 'foo'),
+ array('foo\\', '', 'foo'),
+ array('foo\\/', '', 'foo'),
+ array('foo/\\', '', 'foo'),
+ array('foo.png/', '.png', 'foo'),
+ array('foo.png\\', '.png', 'foo'),
+ array('foo.png\\/', '.png', 'foo'),
+ array('foo.png/\\', '.png', 'foo'),
);
foreach($data as $test){