aboutsummaryrefslogtreecommitdiff
path: root/t/linkpage.t
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-09-27 14:14:36 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-09-27 14:27:42 -0400
commit9ec9d6901d444af48555abf7b4c26d1965c46017 (patch)
tree3139a86f4dcffaea5d90c6120b8b1d25edbc07e6 /t/linkpage.t
parentbfab23ce33c86f03bff6fb5c36f7bf082fe2cbcf (diff)
downloadikiwiki-9ec9d6901d444af48555abf7b4c26d1965c46017.tar
ikiwiki-9ec9d6901d444af48555abf7b4c26d1965c46017.tar.gz
Export pagetitle, titlepage, linkpage.
Diffstat (limited to 't/linkpage.t')
-rwxr-xr-xt/linkpage.t13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/linkpage.t b/t/linkpage.t
new file mode 100755
index 000000000..8085de153
--- /dev/null
+++ b/t/linkpage.t
@@ -0,0 +1,13 @@
+#!/usr/bin/perl
+use warnings;
+use strict;
+use Test::More tests => 7;
+
+BEGIN { use_ok("IkiWiki"); }
+
+is(linkpage("foo bar"), "foo_bar");
+is(linkpage("foo bar baz"), "foo_bar_baz");
+is(linkpage("foo bar/baz"), "foo_bar/baz");
+is(linkpage("foo bar&baz"), "foo_bar__38__baz");
+is(linkpage("foo bar & baz"), "foo_bar___38___baz");
+is(linkpage("foo bar_baz"), "foo_bar_baz");