ikiwiki/t/pagename.t

15 lines
292 B
Perl
Executable File

#!/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");