X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/c439d5a8abcbdac5e00e32362413cbe29c2d8f0e..c1907ded879f75ef07c5bbab26b84042bafc1b17:/t/pagename.t?ds=inline diff --git a/t/pagename.t b/t/pagename.t index 96e6a87f1..43f574e98 100755 --- a/t/pagename.t +++ b/t/pagename.t @@ -1,14 +1,17 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 5; +use Test::More tests => 6; BEGIN { use_ok("IkiWiki"); } # Used internally. -$IkiWiki::hooks{htmlize}{mdwn}=1; +$IkiWiki::hooks{htmlize}{mdwn}{call}=sub {}; is(pagename("foo.mdwn"), "foo"); is(pagename("foo/bar.mdwn"), "foo/bar"); + +# 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");