aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2019-02-03 11:58:25 +0000
committerSimon McVittie <smcv@debian.org>2019-02-03 12:49:05 +0000
commitfae4cce06ab4b5adf7ca2a9e3f43ea2850a94148 (patch)
tree40f7756220ad39f14fb4ad43f718f99c0eea69b4 /t
parent9d1c88adf8556fa83aa3010b31e7184cad66a210 (diff)
downloadikiwiki-fae4cce06ab4b5adf7ca2a9e3f43ea2850a94148.tar
ikiwiki-fae4cce06ab4b5adf7ca2a9e3f43ea2850a94148.tar.gz
trail.t: Exercise numeric escapes in pagenames parameter
Signed-off-by: Simon McVittie <smcv@debian.org>
Diffstat (limited to 't')
-rwxr-xr-xt/trail.t19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/trail.t b/t/trail.t
index a49a9e3bc..d7edd52eb 100755
--- a/t/trail.t
+++ b/t/trail.t
@@ -102,6 +102,12 @@ write_old_file("sorting/end.mdwn", "end");
write_old_file("sorting/new.mdwn", "new");
write_old_file("sorting/old.mdwn", "old");
write_old_file("sorting/ancient.mdwn", "ancient");
+write_old_file("unicode.mdwn", "[[!trailitems pagenames=\"unicode/\xAC unicode/\x{04D2} unicode/\x{2260} unicode/\x{0001F4A9}\"]]");
+write_old_file("unicode2.mdwn", "[[!trailitems pagenames=\"unicode/__172__ unicode/\x{04D2} unicode/__8800__ unicode/__128169__\"]]");
+write_old_file("unicode/__172__.mdwn", "trail item '\xAC'");
+write_old_file("unicode/\x{04D2}.mdwn", "trail item '\x{04D2}'");
+write_old_file("unicode/__8800__.mdwn", "trail item '\x{2260}'");
+write_old_file("unicode/__128169__.mdwn", "trail item '\x{0001F4A9}'");
# These three need to be in the appropriate age order
ok(utime(333333333, 333333333, "t/tmp/in/sorting/new.mdwn"));
ok(utime(222222222, 222222222, "t/tmp/in/sorting/old.mdwn"));
@@ -180,6 +186,19 @@ check_no_trail("snake.html", "wind_in_the_willows");
check_trail("self_referential.html", "n= p=", "self_referential");
+TODO: {
+local $TODO = 'should be able to specify page names without using numeric escapes';
+check_trail("unicode/__172__.html", "n=unicode/\x{04D2} p=", "unicode");
+check_trail("unicode/\x{04D2}.html", "n=unicode/__8800__ p=unicode/__172__", "unicode");
+check_trail("unicode/__8800__.html", "n=unicode/__128169__ p=unicode/\x{04D2}", "unicode");
+check_trail("unicode/__128169__.html", "n= p=unicode/__8800__", "unicode");
+}
+
+check_trail("unicode/__172__.html", "n=unicode/\x{04D2} p=", "unicode2");
+check_trail("unicode/\x{04D2}.html", "n=unicode/__8800__ p=unicode/__172__", "unicode2");
+check_trail("unicode/__8800__.html", "n=unicode/__128169__ p=unicode/\x{04D2}", "unicode2");
+check_trail("unicode/__128169__.html", "n= p=unicode/__8800__", "unicode2");
+
check_trail("add/b.html", "n=add/d p=", "add");
check_trail("add/d.html", "n= p=add/b", "add");
ok(! -f "t/tmp/out/add/a.html");