Skip to content

Commit

Permalink
Merge branch 'add_test_for_dotted_keys' (PR #180)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgonggrijp committed Aug 11, 2024
2 parents 1b4ea6b + c0b03a9 commit 66f078e
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
21 changes: 21 additions & 0 deletions specs/interpolation.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,27 @@
"template": "{{#a}}{{b.c}}{{/a}}",
"expected": ""
},
{
"name": "Dotted Names are never single keys",
"desc": "Dotted names shall not be parsed as single, atomic keys",
"data": {
"a.b": "c"
},
"template": "{{a.b}}",
"expected": ""
},
{
"name": "Dotted Names - No Masking",
"desc": "Dotted Names in a given context are unvavailable due to dot splitting",
"data": {
"a.b": "c",
"a": {
"b": "d"
}
},
"template": "{{a.b}}",
"expected": "d"
},
{
"name": "Implicit Iterators - Basic Interpolation",
"desc": "Unadorned tags should interpolate content into the template.",
Expand Down
15 changes: 15 additions & 0 deletions specs/interpolation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,21 @@ tests:
template: '{{#a}}{{b.c}}{{/a}}'
expected: ''

- name: Dotted Names are never single keys
desc: Dotted names shall not be parsed as single, atomic keys
data:
a.b: c
template: '{{a.b}}'
expected: ''

- name: Dotted Names - No Masking
desc: Dotted Names in a given context are unvavailable due to dot splitting
data:
a.b: c
a: { b: d }
template: '{{a.b}}'
expected: 'd'

# Implicit Iterators

- name: Implicit Iterators - Basic Interpolation
Expand Down

0 comments on commit 66f078e

Please sign in to comment.