aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2011-11-12 21:37:28 +0000
committerSimon McVittie <smcv@debian.org>2011-11-12 21:37:28 +0000
commitd70ba7cff3fc6cc78ea2f8eb0713212478ab6ba7 (patch)
tree6e8b98b163d0493b89d15658dc77206ab9b7bbe0 /t
parent74b1b2761ac21e73376d714503aad326dd6f8fec (diff)
downloadikiwiki-d70ba7cff3fc6cc78ea2f8eb0713212478ab6ba7.tar
ikiwiki-d70ba7cff3fc6cc78ea2f8eb0713212478ab6ba7.tar.gz
Split trail directive into trailitems, trailoptions
Diffstat (limited to 't')
-rwxr-xr-xt/trail.t15
1 files changed, 8 insertions, 7 deletions
diff --git a/t/trail.t b/t/trail.t
index 28aa1c09d..0cf50ddc1 100755
--- a/t/trail.t
+++ b/t/trail.t
@@ -35,16 +35,16 @@ writefile("mushroom.mdwn", "t/tmp/in", "content of mushroom");
writefile("snake.mdwn", "t/tmp/in", "content of snake");
writefile("ratty.mdwn", "t/tmp/in", "content of ratty");
writefile("mr_toad.mdwn", "t/tmp/in", "content of mr toad");
-writefile("add.mdwn", "t/tmp/in", '[[!trail pagenames="add/a add/b add/c add/d add/e"]]');
+writefile("add.mdwn", "t/tmp/in", '[[!trailitems pagenames="add/a add/b add/c add/d add/e"]]');
writefile("add/b.mdwn", "t/tmp/in", "b");
writefile("add/d.mdwn", "t/tmp/in", "d");
-writefile("del.mdwn", "t/tmp/in", '[[!trail pages="del/*" sort=title]]');
+writefile("del.mdwn", "t/tmp/in", '[[!trailitems pages="del/*" sort=title]]');
writefile("del/a.mdwn", "t/tmp/in", "a");
writefile("del/b.mdwn", "t/tmp/in", "b");
writefile("del/c.mdwn", "t/tmp/in", "c");
writefile("del/d.mdwn", "t/tmp/in", "d");
writefile("del/e.mdwn", "t/tmp/in", "e");
-writefile("self_referential.mdwn", "t/tmp/in", '[[!trail pagenames="self_referential" circular=yes]]');
+writefile("self_referential.mdwn", "t/tmp/in", '[[!trailitems pagenames="self_referential" circular=yes]]');
writefile("sorting/linked.mdwn", "t/tmp/in", "linked");
writefile("sorting/a/b.mdwn", "t/tmp/in", "a/b");
writefile("sorting/a/c.mdwn", "t/tmp/in", "a/c");
@@ -64,8 +64,8 @@ writefile("sorting/linked2.mdwn", "t/tmp/in", "linked2");
# for trail. We change it later.
writefile("sorting.mdwn", "t/tmp/in",
'[[!traillink linked]] ' .
- '[[!trail pages="sorting/z/a or sorting/a/b or sorting/a/c"]] ' .
- '[[!trail pagenames="beginning middle end"]] ' .
+ '[[!trailitems pages="sorting/z/a or sorting/a/b or sorting/a/c"]] ' .
+ '[[!trailitems pagenames="beginning middle end"]] ' .
'[[!trailinline pages="sorting/old or sorting/ancient or sorting/new"]] ' .
'[[!traillink linked2]]');
@@ -83,7 +83,8 @@ EOF
);
writefile("wind_in_the_willows.mdwn", "t/tmp/in", <<EOF
-[[!trail circular=yes sort=title pages="ratty or badger or mr_toad"]]
+[[!trailoptions circular=yes sort=title]]
+[[!trailitems pages="ratty or badger or mr_toad"]]
[[!trailitem moley]]
EOF
);
@@ -183,7 +184,7 @@ ok(unlink("t/tmp/in/del/e.mdwn"));
writefile("sorting.mdwn", "t/tmp/in",
readfile("t/tmp/in/sorting.mdwn") .
- '[[!trailinline pages="doesnt_exist" trailsort="title" trailreverse="yes"]]');
+ '[[!trailoptions sort="title" reverse="yes"]]');
ok(! system("$command -refresh"));