master
joey 2006-09-11 03:52:55 +00:00
parent 80508e4e79
commit c439d5a8ab
2 changed files with 28 additions and 0 deletions

14
t/pagename.t 100755
View File

@ -0,0 +1,14 @@
#!/usr/bin/perl
use warnings;
use strict;
use Test::More tests => 5;
BEGIN { use_ok("IkiWiki"); }
# Used internally.
$IkiWiki::hooks{htmlize}{mdwn}=1;
is(pagename("foo.mdwn"), "foo");
is(pagename("foo/bar.mdwn"), "foo/bar");
is(pagename("foo.png"), "foo.png");
is(pagename("foo"), "foo");

14
t/pagetype.mdwn 100755
View File

@ -0,0 +1,14 @@
#!/usr/bin/perl
use warnings;
use strict;
use Test::More tests => 5;
BEGIN { use_ok("IkiWiki"); }
# Used internally.
$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);