4 use Test::More tests => 8;
6 BEGIN { use_ok("IkiWiki"); }
9 $IkiWiki::hooks{htmlize}{mdwn}={};
10 $IkiWiki::hooks{htmlize}{txt}={keepextension => 1};
12 is(pagename("foo.mdwn"), "foo");
13 is(pagename("foo/bar.mdwn"), "foo/bar");
15 # bare files get the full filename as page name
16 is(pagename("foo.png"), "foo.png");
17 is(pagename("foo/bar.png"), "foo/bar.png");
18 is(pagename("foo"), "foo");
20 # keepextension preserves the extension in the page name
21 is(pagename("foo.txt"), "foo.txt");
22 is(pagename("foo/bar.txt"), "foo/bar.txt");