diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-04-04 17:27:48 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-04-04 17:27:48 -0400 |
commit | 8e92468eae9ac0ab8161a0c71ff6c6a0a8aef07a (patch) | |
tree | 9e26465e0ca98a5f3cbc6c72a0cace4bf83b93db /t/beautify_urlpath.t | |
parent | 78a69e5bd632eb86ef8135e9c1d05d2c48b43362 (diff) | |
parent | 08fda4c9d374de1d3de3172a192d4d915d3dc0c1 (diff) | |
download | ikiwiki-8e92468eae9ac0ab8161a0c71ff6c6a0a8aef07a.tar ikiwiki-8e92468eae9ac0ab8161a0c71ff6c6a0a8aef07a.tar.gz |
Merge branch 'master'
Conflicts:
doc/ikiwiki-makerepo.mdwn
Diffstat (limited to 't/beautify_urlpath.t')
-rwxr-xr-x | t/beautify_urlpath.t | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/t/beautify_urlpath.t b/t/beautify_urlpath.t new file mode 100755 index 000000000..94b923d3b --- /dev/null +++ b/t/beautify_urlpath.t @@ -0,0 +1,17 @@ +#!/usr/bin/perl +use warnings; +use strict; +use Test::More tests => 8; + +BEGIN { use_ok("IkiWiki"); } + +$IkiWiki::config{usedirs} = 1; +$IkiWiki::config{htmlext} = "HTML"; +is(IkiWiki::beautify_urlpath("foo/bar"), "./foo/bar"); +is(IkiWiki::beautify_urlpath("../badger"), "../badger"); +is(IkiWiki::beautify_urlpath("./bleh"), "./bleh"); +is(IkiWiki::beautify_urlpath("foo/index.HTML"), "./foo/"); +is(IkiWiki::beautify_urlpath("index.HTML"), "./"); +is(IkiWiki::beautify_urlpath("../index.HTML"), "../"); +$IkiWiki::config{usedirs} = 0; +is(IkiWiki::beautify_urlpath("foo/index.HTML"), "./foo/index.HTML"); |