diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-02-19 18:28:43 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-02-19 18:28:43 -0500 |
commit | c1907ded879f75ef07c5bbab26b84042bafc1b17 (patch) | |
tree | d9deeee6e3665743a53b6e029ac7698a93346e39 /t/pagename.t | |
parent | 8c8b18935b84bcfbf06649c9683e236e39f75df3 (diff) | |
download | ikiwiki-c1907ded879f75ef07c5bbab26b84042bafc1b17.tar ikiwiki-c1907ded879f75ef07c5bbab26b84042bafc1b17.tar.gz |
fix pagename, pagetype tests
Put tests in right file.
Set internal variable to hash, the functions expect that.
Diffstat (limited to 't/pagename.t')
-rwxr-xr-x | t/pagename.t | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/t/pagename.t b/t/pagename.t index c7f1ce180..43f574e98 100755 --- a/t/pagename.t +++ b/t/pagename.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 5; +use Test::More tests => 6; BEGIN { use_ok("IkiWiki"); } @@ -10,5 +10,8 @@ $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"); |