aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2014-09-14 15:15:27 +0100
committerSimon McVittie <smcv@debian.org>2014-09-14 15:15:27 +0100
commitab768a62c66335a96a5791c444e54b8ae3b078b1 (patch)
tree9ef9240911c5c988967b1a7f0edbefe1a92c27be /t
parent43367c5e30130601dd526b017b29fc05a4c940e6 (diff)
downloadikiwiki-ab768a62c66335a96a5791c444e54b8ae3b078b1.tar
ikiwiki-ab768a62c66335a96a5791c444e54b8ae3b078b1.tar.gz
Rename show parameter of [[!inline]] and [[!pagestats]] to limit
The old name still works, if its value is numeric. This name allows a non-numeric "show" to mean the same thing it does for [[!map]] (show title, show description, etc.).
Diffstat (limited to 't')
-rwxr-xr-xt/inline.t5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/inline.t b/t/inline.t
index 726227b8f..d1ec9a6d6 100755
--- a/t/inline.t
+++ b/t/inline.t
@@ -20,9 +20,10 @@ sub write_old_file {
write_old_file("protagonists.mdwn",
'[[!inline pages="protagonists/*" rootpage="protagonists/new"]]');
write_old_file("friends.mdwn",
- '[[!inline pages="friends/*" postform=yes sort=title show=2]]');
+ '[[!inline pages="friends/*" postform=yes sort=title limit=2]]');
write_old_file("antagonists.mdwn",
'[[!inline pages="antagonists/*"]]');
+# using old spelling of "limit" ("show") to verify backwards compat
write_old_file("enemies.mdwn",
'[[!inline pages="enemies/*" postform=no rootpage=enemies sort=title reverse=yes show=2]]');
foreach my $page (qw(protagonists/shepard protagonists/link
@@ -53,7 +54,7 @@ like($blob, qr{<input type="hidden" name="from" value="friends"},
like($blob, qr[this page is {friends/garrus}.*this page is {friends/liara}]s,
'first two pages in desired sort order are present');
unlike($blob, qr{friends/(?:midna|telma)},
- 'pages excluded by show should not be present');
+ 'pages excluded by limit should not be present');
$blob = readfile("t/tmp/out/antagonists.html");
unlike($blob, qr{Add a new post}, 'default is no postform');