]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - t/beautify_urlpath.t
Use $a and $b for SortSpec cmp callbacks
[git.ikiwiki.info.git] / t / beautify_urlpath.t
1 #!/usr/bin/perl
2 use warnings;
3 use strict;
4 use Test::More tests => 8;
6 BEGIN { use_ok("IkiWiki"); }
8 $IkiWiki::config{usedirs} = 1;
9 $IkiWiki::config{htmlext} = "HTML";
10 is(IkiWiki::beautify_urlpath("foo/bar"), "./foo/bar");
11 is(IkiWiki::beautify_urlpath("../badger"), "../badger");
12 is(IkiWiki::beautify_urlpath("./bleh"), "./bleh");
13 is(IkiWiki::beautify_urlpath("foo/index.HTML"), "./foo/");
14 is(IkiWiki::beautify_urlpath("index.HTML"), "./");
15 is(IkiWiki::beautify_urlpath("../index.HTML"), "../");
16 $IkiWiki::config{usedirs} = 0;
17 is(IkiWiki::beautify_urlpath("foo/index.HTML"), "./foo/index.HTML");