diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-09-11 03:52:55 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-09-11 03:52:55 +0000 |
commit | c439d5a8abcbdac5e00e32362413cbe29c2d8f0e (patch) | |
tree | b6da39cd88d3ed5c95df677c03081c30fbd2c6b9 | |
parent | 80508e4e7955b22293c8f74486f48d1655496f62 (diff) |
add
-rwxr-xr-x | t/pagename.t | 14 | ||||
-rwxr-xr-x | t/pagetype.mdwn | 14 |
2 files changed, 28 insertions, 0 deletions
diff --git a/t/pagename.t b/t/pagename.t new file mode 100755 index 000000000..96e6a87f1 --- /dev/null +++ b/t/pagename.t @@ -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"); diff --git a/t/pagetype.mdwn b/t/pagetype.mdwn new file mode 100755 index 000000000..76cacd8f7 --- /dev/null +++ b/t/pagetype.mdwn @@ -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); |