X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/156f70912213b6520e9056050a8827de66e80176..3867f038a79784119e67ad36a191b64d2f574a3b:/t/trail.t diff --git a/t/trail.t b/t/trail.t index ce7d92048..17fe54310 100755 --- a/t/trail.t +++ b/t/trail.t @@ -35,16 +35,39 @@ 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"); +writefile("sorting/z/a.mdwn", "t/tmp/in", "z/a"); +writefile("sorting/beginning.mdwn", "t/tmp/in", "beginning"); +writefile("sorting/middle.mdwn", "t/tmp/in", "middle"); +writefile("sorting/end.mdwn", "t/tmp/in", "end"); +writefile("sorting/new.mdwn", "t/tmp/in", "new"); +writefile("sorting/old.mdwn", "t/tmp/in", "old"); +writefile("sorting/ancient.mdwn", "t/tmp/in", "ancient"); +# 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")); +ok(utime(111111111, 111111111, "t/tmp/in/sorting/ancient.mdwn")); +writefile("sorting/linked2.mdwn", "t/tmp/in", "linked2"); +# This initially uses the default sort order: age for the inline, and path +# for trailitems. We change it later. +writefile("sorting.mdwn", "t/tmp/in", + '[[!traillink linked]] ' . + '[[!trailitems pages="sorting/z/a or sorting/a/b or sorting/a/c"]] ' . + '[[!trailitems pagenames="beginning middle end"]] ' . + '[[!inline pages="sorting/old or sorting/ancient or sorting/new" trail="yes"]] ' . + '[[!traillink linked2]]'); writefile("meme.mdwn", "t/tmp/in", <