diff options
author | Simon McVittie <smcv@debian.org> | 2015-03-01 17:15:13 +0000 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2015-03-01 17:15:13 +0000 |
commit | 9497fc1b6c665ca7eb9ca0b5a0b1ad699e040c49 (patch) | |
tree | 3cd39dc738cb774d82070478e7fa82c86c759446 /t | |
parent | a1fda0b516cc4e85b7304838949df8fbe0044cf3 (diff) | |
download | ikiwiki-9497fc1b6c665ca7eb9ca0b5a0b1ad699e040c49.tar ikiwiki-9497fc1b6c665ca7eb9ca0b5a0b1ad699e040c49.tar.gz |
t/inline.t: accept translations of "Add a new post titled:" (Closes: #779365)
Diffstat (limited to 't')
-rwxr-xr-x | t/inline.t | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/t/inline.t b/t/inline.t index e07658d98..f2ffbbc2f 100755 --- a/t/inline.t +++ b/t/inline.t @@ -6,6 +6,8 @@ use IkiWiki; my $blob; +my $add_new_post = gettext("Add a new post titled:"); + ok(! system("rm -rf t/tmp")); ok(! system("mkdir t/tmp")); @@ -42,12 +44,12 @@ ok(! system($command)); ok(! system("$command --refresh")); $blob = readfile("t/tmp/out/protagonists.html"); -like($blob, qr{Add a new post}, 'rootpage=yes gives postform'); +like($blob, qr{\Q$add_new_post\E}, 'rootpage=yes gives postform'); like($blob, qr{<input type="hidden" name="from" value="protagonists/new"}, 'explicit rootpage is /protagonists/new'); $blob = readfile("t/tmp/out/friends.html"); -like($blob, qr{Add a new post}, 'postform=yes forces postform'); +like($blob, qr{\Q$add_new_post\E}, 'postform=yes forces postform'); like($blob, qr{<input type="hidden" name="from" value="friends"}, 'implicit rootpage is /friends'); like($blob, qr[this page is {friends/garrus}.*this page is {friends/liara}]s, @@ -56,10 +58,10 @@ unlike($blob, qr{friends/(?:midna|telma)}, 'pages excluded by show should not be present'); $blob = readfile("t/tmp/out/antagonists.html"); -unlike($blob, qr{Add a new post}, 'default is no postform'); +unlike($blob, qr{\Q$add_new_post\E}, 'default is no postform'); $blob = readfile("t/tmp/out/enemies.html"); -unlike($blob, qr{Add a new post}, 'postform=no forces no postform'); +unlike($blob, qr{\Q$add_new_post\E}, 'postform=no forces no postform'); like($blob, qr[this page is {enemies/zant}.*this page is {enemies/rachni}]s, 'first two pages in reversed sort order are present'); unlike($blob, qr{enemies/(?:benezia|geth)}, |