fix pagetype test

File had wrong name, and made wrong assumption about what pagetype does for
bare files.
master
Joey Hess 2009-02-19 18:22:51 -05:00
parent 621e8d876b
commit 8c8b18935b
1 changed files with 6 additions and 3 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/perl #!/usr/bin/perl
use warnings; use warnings;
use strict; use strict;
use Test::More tests => 5; use Test::More tests => 6;
BEGIN { use_ok("IkiWiki"); } BEGIN { use_ok("IkiWiki"); }
@ -10,5 +10,8 @@ $IkiWiki::hooks{htmlize}{mdwn}=1;
is(pagetype("foo.mdwn"), "mdwn"); is(pagetype("foo.mdwn"), "mdwn");
is(pagetype("foo/bar.mdwn"), "mdwn"); is(pagetype("foo/bar.mdwn"), "mdwn");
is(pagename("foo.png"), undef);
is(pagename("foo"), undef); # 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");