]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - t/pagename.t
43f574e9878ba49e4e27396bf64484d9fb7df14c
[git.ikiwiki.info.git] / t / pagename.t
1 #!/usr/bin/perl
2 use warnings;
3 use strict;
4 use Test::More tests => 6;
6 BEGIN { use_ok("IkiWiki"); }
8 # Used internally.
9 $IkiWiki::hooks{htmlize}{mdwn}{call}=sub {};
11 is(pagename("foo.mdwn"), "foo");
12 is(pagename("foo/bar.mdwn"), "foo/bar");
14 # bare files get the full filename as page name
15 is(pagename("foo.png"), "foo.png");
16 is(pagename("foo/bar.png"), "foo/bar.png");
17 is(pagename("foo"), "foo");