From 8c8b18935b84bcfbf06649c9683e236e39f75df3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 19 Feb 2009 18:22:51 -0500 Subject: [PATCH] fix pagetype test File had wrong name, and made wrong assumption about what pagetype does for bare files. --- t/{pagetype.mdwn => pagetype.t} | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) rename t/{pagetype.mdwn => pagetype.t} (51%) diff --git a/t/pagetype.mdwn b/t/pagetype.t similarity index 51% rename from t/pagetype.mdwn rename to 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"); -- 2.26.2