summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn M Moore <code@sartak.org>2012-12-07 14:45:08 -0500
committerShawn M Moore <code@sartak.org>2012-12-07 14:45:08 -0500
commita43eefc87bf7aa895c9316568dca748231848462 (patch)
tree7a164882e16e34d4a74a845530bca694fa4b65d5
parent12631bd7e7c151640b7695768455ee98dab942b6 (diff)
downloadtext-handlebars-a43eefc87bf7aa895c9316568dca748231848462.tar.gz
text-handlebars-a43eefc87bf7aa895c9316568dca748231848462.zip
Add failing test for {{#each}} with {{../foo}}
-rw-r--r--t/block-helper-builtins.t28
1 files changed, 28 insertions, 0 deletions
diff --git a/t/block-helper-builtins.t b/t/block-helper-builtins.t
index c891b89..dac692e 100644
--- a/t/block-helper-builtins.t
+++ b/t/block-helper-builtins.t
@@ -196,4 +196,32 @@ RENDERED
"unless helper (true)"
);
+{ local $TODO = "unimplemented"; local $SIG{__WARN__} = sub { };
+render_ok(
+ <<'TEMPLATE',
+<ul class="people_list">
+ {{#each people}}
+ <li>{{../description}} {{this}}</li>
+ {{/each}}
+</ul>
+TEMPLATE
+ {
+ description => "The Wonderful",
+ people => [
+ "Yehuda Katz",
+ "Alan Johnson",
+ "Charles Jolley",
+ ],
+ },
+ <<'RENDERED',
+<ul class="people_list">
+ <li>The Wonderful Yehuda Katz</li>
+ <li>The Wonderful Alan Johnson</li>
+ <li>The Wonderful Charles Jolley</li>
+</ul>
+RENDERED
+ "each helper with ../"
+);
+}
+
done_testing;