From c1907ded879f75ef07c5bbab26b84042bafc1b17 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 19 Feb 2009 18:28:43 -0500 Subject: fix pagename, pagetype tests Put tests in right file. Set internal variable to hash, the functions expect that. --- t/pagename.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 't/pagename.t') 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"); -- cgit v1.2.3