summaryrefslogtreecommitdiff
path: root/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
parentbfab23ce33c86f03bff6fb5c36f7bf082fe2cbcf (diff)
Export pagetitle, titlepage, linkpage.
Diffstat (limited to 't')
-rwxr-xr-xt/linkpage.t13
-rwxr-xr-xt/pagetitle.t12
-rwxr-xr-xt/titlepage.t12
3 files changed, 25 insertions, 12 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");
diff --git a/t/pagetitle.t b/t/pagetitle.t
index 37adba144..d9aa62063 100755
--- a/t/pagetitle.t
+++ b/t/pagetitle.t
@@ -5,9 +5,9 @@ use Test::More tests => 7;
BEGIN { use_ok("IkiWiki"); }
-is(IkiWiki::pagetitle("foo_bar"), "foo bar");
-is(IkiWiki::pagetitle("foo_bar_baz"), "foo bar baz");
-is(IkiWiki::pagetitle("foo_bar__33__baz"), "foo bar&#33;baz");
-is(IkiWiki::pagetitle("foo_bar__1234__baz"), "foo bar&#1234;baz");
-is(IkiWiki::pagetitle("foo_bar___33___baz"), "foo bar &#33; baz");
-is(IkiWiki::pagetitle("foo_bar___95___baz"), "foo bar &#95; baz");
+is(pagetitle("foo_bar"), "foo bar");
+is(pagetitle("foo_bar_baz"), "foo bar baz");
+is(pagetitle("foo_bar__33__baz"), "foo bar&#33;baz");
+is(pagetitle("foo_bar__1234__baz"), "foo bar&#1234;baz");
+is(pagetitle("foo_bar___33___baz"), "foo bar &#33; baz");
+is(pagetitle("foo_bar___95___baz"), "foo bar &#95; baz");
diff --git a/t/titlepage.t b/t/titlepage.t
index cc56db70c..5df33423e 100755
--- a/t/titlepage.t
+++ b/t/titlepage.t
@@ -5,9 +5,9 @@ use Test::More tests => 7;
BEGIN { use_ok("IkiWiki"); }
-is(IkiWiki::titlepage("foo bar"), "foo_bar");
-is(IkiWiki::titlepage("foo bar baz"), "foo_bar_baz");
-is(IkiWiki::titlepage("foo bar/baz"), "foo_bar/baz");
-is(IkiWiki::titlepage("foo bar&baz"), "foo_bar__38__baz");
-is(IkiWiki::titlepage("foo bar & baz"), "foo_bar___38___baz");
-is(IkiWiki::titlepage("foo bar_baz"), "foo_bar__95__baz");
+is(titlepage("foo bar"), "foo_bar");
+is(titlepage("foo bar baz"), "foo_bar_baz");
+is(titlepage("foo bar/baz"), "foo_bar/baz");
+is(titlepage("foo bar&baz"), "foo_bar__38__baz");
+is(titlepage("foo bar & baz"), "foo_bar___38___baz");
+is(titlepage("foo bar_baz"), "foo_bar__95__baz");