summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/pagetype.t (renamed from t/pagetype.mdwn)9
1 files changed, 6 insertions, 3 deletions
diff --git a/t/pagetype.mdwn b/t/pagetype.t
index 76cacd8f7..2df59387a 100755
--- a/t/pagetype.mdwn
+++ b/t/pagetype.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use warnings;
use strict;
-use Test::More tests => 5;
+use Test::More tests => 6;
BEGIN { use_ok("IkiWiki"); }
@@ -10,5 +10,8 @@ $IkiWiki::hooks{htmlize}{mdwn}=1;
is(pagetype("foo.mdwn"), "mdwn");
is(pagetype("foo/bar.mdwn"), "mdwn");
-is(pagename("foo.png"), undef);
-is(pagename("foo"), undef);
+
+# bare files get the full filename as page name
+is(pagename("foo.png"), "foo.png");
+is(pagename("foo/bar.png"), "foo/bar.png");
+is(pagename("foo"), "foo");