Skip to content
This repository was archived by the owner on Oct 11, 2021. It is now read-only.

Commit ff99f8f

Browse files
committed
Test headers and footers
1 parent 016aeff commit ff99f8f

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

plugins/Order/t/11-basic.t

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use MT::Template::Context;
88
use MT::Builder;
99
use MT::App;
1010

11-
use Test::More tests => 5;
11+
use Test::More tests => 6;
1212

1313
use Order::Plugin;
1414

@@ -67,6 +67,26 @@ $t = <<EOF;
6767
EOF
6868
like(build($t), qr{ \A \s* goodbye \s+ hello \s* \z }xms, "Order puts two items in order");
6969

70+
$t = <<EOF;
71+
<mt:Order>
72+
<mt:OrderItem>
73+
<mt:setvarblock name="order_by">bar</mt:setvarblock>
74+
hello
75+
</mt:OrderItem>
76+
<mt:OrderFooter>
77+
farewell
78+
</mt:OrderFooter>
79+
<mt:OrderItem>
80+
<mt:setvarblock name="order_by">foo</mt:setvarblock>
81+
goodbye
82+
</mt:OrderItem>
83+
<mt:OrderHeader>
84+
hi
85+
</mt:OrderHeader>
86+
</mt:Order>
87+
EOF
88+
like(build($t), qr{ \A \s* hi \s+ goodbye \s+ hello \s+ farewell \s* \z }xms, "Order puts two items in order");
89+
7090
$t = <<EOF;
7191
<mt:Order>
7292
<mt:For from="5" to="9">

0 commit comments

Comments
 (0)