File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 281281 "template" : " {{#a}}{{b.c}}{{/a}}" ,
282282 "expected" : " "
283283 },
284+ {
285+ "name" : " Dotted Names are never single keys" ,
286+ "desc" : " Dotted names shall not be parsed as single, atomic keys" ,
287+ "data" : {
288+ "a.b" : " c"
289+ },
290+ "template" : " {{a.b}}" ,
291+ "expected" : " "
292+ },
293+ {
294+ "name" : " Dotted Names - No Masking" ,
295+ "desc" : " Dotted Names in a given context are unvavailable due to dot splitting" ,
296+ "data" : {
297+ "a.b" : " c" ,
298+ "a" : {
299+ "b" : " d"
300+ }
301+ },
302+ "template" : " {{a.b}}" ,
303+ "expected" : " d"
304+ },
284305 {
285306 "name" : " Implicit Iterators - Basic Interpolation" ,
286307 "desc" : " Unadorned tags should interpolate content into the template." ,
Original file line number Diff line number Diff line change @@ -203,6 +203,21 @@ tests:
203203 template : ' {{#a}}{{b.c}}{{/a}}'
204204 expected : ' '
205205
206+ - name : Dotted Names are never single keys
207+ desc : Dotted names shall not be parsed as single, atomic keys
208+ data :
209+ a.b : c
210+ template : ' {{a.b}}'
211+ expected : ' '
212+
213+ - name : Dotted Names - No Masking
214+ desc : Dotted Names in a given context are unvavailable due to dot splitting
215+ data :
216+ a.b : c
217+ a : { b: d }
218+ template : ' {{a.b}}'
219+ expected : ' d'
220+
206221 # Implicit Iterators
207222
208223 - name : Implicit Iterators - Basic Interpolation
You can’t perform that action at this time.
0 commit comments