diff options
-rw-r--r-- | specs/dot-notation.yml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/specs/dot-notation.yml b/specs/dot-notation.yml index ba50055..c1fc114 100644 --- a/specs/dot-notation.yml +++ b/specs/dot-notation.yml @@ -34,3 +34,35 @@ tests: b: { c: { d: { e: { name: 'Wrong' } } } } template: '"{{#a}}{{b.c.d.e.name}}{{/a}}" == "Phil"' expected: '"Phil" == "Phil"' + + # Tag Compatibility + + - name: Unescaped Interpolation + desc: Dot notation should be functional with all basic tag types. + data: { person: { name: 'Joe' } } + template: '"{{{person.name}}}" == "{{#person}}{{{name}}}{{/person}}"' + expected: '"Joe" == "Joe"' + + - name: Sections (Truthy) + desc: Dot notation should be functional with all basic tag types. + data: { person: { present: true } } + template: '"{{#person.present}}Here{{/person.present}}" == "Here"' + expected: '"Here" == "Here"' + + - name: Sections (Falsey) + desc: Dot notation should be functional with all basic tag types. + data: { person: { present: false } } + template: '"{{#person.present}}Here{{/person.present}}" == ""' + expected: '"" == ""' + + - name: Inverted Sections (Truthy) + desc: Dot notation should be functional with all basic tag types. + data: { person: { present: true } } + template: '"{{^person.present}}Not Here{{/person.present}}" == ""' + expected: '"" == ""' + + - name: Inverted Sections (Falsey) + desc: Dot notation should be functional with all basic tag types. + data: { person: { present: false } } + template: '"{{^person.present}}Not Here{{/person.present}}" == "Not Here"' + expected: '"Not Here" == "Not Here"' |