doubtfil about patch #3
[ikiwiki.git] / t / beautify_urlpath.t
blob94b923d3bd2fc9ad1dbc81588249272c0f509ff3
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");