diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2008-12-21 12:50:30 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2008-12-21 12:50:30 -0500 |
commit | 9bee6db8c604efd705d6d808fca3194eb4873cf4 (patch) | |
tree | 5f4d6c35c0cd65fa18526f7512f4dfb271768abc /t | |
parent | b2842b88385acb68569f00ed45b49f0cf5383983 (diff) | |
parent | 9e5f504e1a9c428580c17e13fc1f76bc38727e3c (diff) | |
download | ikiwiki-9bee6db8c604efd705d6d808fca3194eb4873cf4.tar ikiwiki-9bee6db8c604efd705d6d808fca3194eb4873cf4.tar.gz |
Merge commit 'smcv/comments'
Diffstat (limited to 't')
-rwxr-xr-x | t/beautify_urlpath.t | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/beautify_urlpath.t b/t/beautify_urlpath.t new file mode 100755 index 000000000..b9d3493a2 --- /dev/null +++ b/t/beautify_urlpath.t @@ -0,0 +1,16 @@ +#!/usr/bin/perl +use warnings; +use strict; +use Test::More tests => 7; + +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"), "./"); +$IkiWiki::config{usedirs} = 0; +is(IkiWiki::beautify_urlpath("foo/index.HTML"), "./foo/index.HTML"); |