summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2012-04-29 18:03:05 -0700
committerChris Jerdonek <chris.jerdonek@gmail.com>2012-04-29 18:04:47 -0700
commita5d084b2381a507995331ffb0da141f4f593ca66 (patch)
tree08631fbf2c1ecfaf66a9b8f7e1b1afddb53cabc8
parent9b1bc7ad19247e9671304af02078f2ce30132665 (diff)
downloadmustache-spec-a5d084b2381a507995331ffb0da141f4f593ca66.tar.gz
Added "Dotted Names - Context Precedence" test.
This test case tests that successive portions of dotted names should be resolved against former resolutions (i.e. forward-only progress).
-rw-r--r--specs/interpolation.yml6
1 files changed, 6 insertions, 0 deletions
diff --git a/specs/interpolation.yml b/specs/interpolation.yml
index 2237b55..d5f2c0d 100644
--- a/specs/interpolation.yml
+++ b/specs/interpolation.yml
@@ -171,6 +171,12 @@ tests:
template: '"{{#a}}{{b.c.d.e.name}}{{/a}}" == "Phil"'
expected: '"Phil" == "Phil"'
+ - name: Dotted Names - Context Precedence
+ desc: Dotted names should be resolved against former resolutions.
+ data: { a: { b: 'b found: ERROR' }, c: { a: 'b not found'} }
+ template: '{{#c}}"{{a}}" : "{{a.b}}"{{/c}}'
+ expected: '"b not found" : ""'
+
# Whitespace Sensitivity
- name: Interpolation - Surrounding Whitespace