summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
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!baz");
-is(IkiWiki::pagetitle("foo_bar__1234__baz"), "foo barӒbaz");
-is(IkiWiki::pagetitle("foo_bar___33___baz"), "foo bar ! baz");
-is(IkiWiki::pagetitle("foo_bar___95___baz"), "foo bar _ baz");
+is(pagetitle("foo_bar"), "foo bar");
+is(pagetitle("foo_bar_baz"), "foo bar baz");
+is(pagetitle("foo_bar__33__baz"), "foo bar!baz");
+is(pagetitle("foo_bar__1234__baz"), "foo barӒbaz");
+is(pagetitle("foo_bar___33___baz"), "foo bar ! baz");
+is(pagetitle("foo_bar___95___baz"), "foo bar _ 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");