summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-02-19 18:22:51 -0500
committerJoey Hess <joey@gnu.kitenet.net>2009-02-19 18:23:40 -0500
commit8c8b18935b84bcfbf06649c9683e236e39f75df3 (patch)
treeb020a75d1f424cb5dac47ead20cf626c62df7865 /t
parent621e8d876ba516ee1aa641554280c20cfbbf0fc7 (diff)
fix pagetype test
File had wrong name, and made wrong assumption about what pagetype does for bare files.
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");