summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Martin <amartin@layer3com.com>2015-10-06 08:45:00 -0400
committerGabriel Scherer <gabriel.scherer@gmail.com>2021-03-09 09:44:11 +0100
commit7d11e61bf5f4bee890d55184089493d185e82974 (patch)
tree99350a9b6561d3c3e1eb5b27ee54caa295411f4e
parent995959b65f5184477f3dfab26eb75c24237ed435 (diff)
downloadmustache-spec-7d11e61bf5f4bee890d55184089493d185e82974.tar.gz
Add List context check
-rw-r--r--specs/sections.yml15
1 files changed, 15 insertions, 0 deletions
diff --git a/specs/sections.yml b/specs/sections.yml
index d204bea..2d1e982 100644
--- a/specs/sections.yml
+++ b/specs/sections.yml
@@ -68,6 +68,21 @@ tests:
template: '"{{#foo}} {{.}} is {{foo}} {{/foo}}"'
expected: '"bar is bar"'
+ - name: List Contexts
+ desc: All elements on the context stack should be accessible within lists.
+ data:
+ tops:
+ - tname:
+ upper: "A"
+ lower: "a"
+ middles:
+ - mname: "1"
+ bottoms:
+ - bname: "x"
+ - bname: "y"
+ template: '{{#tops}}{{#middles}}{{tname.lower}}{{mname}}.{{#bottoms}}{{tname.upper}}{{mname}}{{bname}}.{{/bottoms}}{{/middles}}{{/tops}}'
+ expected: 'a1.A1x.A1y.'
+
- name: Deeply Nested Contexts
desc: All elements on the context stack should be accessible.
data: