From c14dd55524260cdd6d399cbb8f851599c9f1796c Mon Sep 17 00:00:00 2001 From: Julian Gonggrijp Date: Mon, 19 Apr 2021 02:29:03 +0200 Subject: Mark inheritance spec as optional --- specs/inheritance.json | 235 ------------------------------------------------ specs/inheritance.yml | 194 --------------------------------------- specs/~inheritance.json | 235 ++++++++++++++++++++++++++++++++++++++++++++++++ specs/~inheritance.yml | 194 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 429 insertions(+), 429 deletions(-) delete mode 100644 specs/inheritance.json delete mode 100644 specs/inheritance.yml create mode 100644 specs/~inheritance.json create mode 100644 specs/~inheritance.yml diff --git a/specs/inheritance.json b/specs/inheritance.json deleted file mode 100644 index 809b693..0000000 --- a/specs/inheritance.json +++ /dev/null @@ -1,235 +0,0 @@ -{ - "__ATTN__": "Do not edit this file; changes belong in the appropriate YAML file.", - "overview": "Parent tags are used to expand an external template into the current template,\nwith optional parameters delimited by block tags.\n\nThese tags' content MUST be a non-whitespace character sequence NOT containing\nthe current closing delimiter; each Parent tag MUST be followed by an End\nSection tag with the same content within the matching parent tag.\n\nBlock tags are used inside of parent tags to assign data onto the context\nstack prior to rendering the parent template. Outside of parent tags, block\ntags are used to indicate where value set in the parent tag should be placed.\nIf no value is set then the content in between the block tags, if any, is\nrendered.\n", - "tests": [ - { - "name": "Default", - "desc": "Default content should be rendered if the block isn't overridden", - "data": { - }, - "template": "{{$title}}Default title{{/title}}\n", - "expected": "Default title\n" - }, - { - "name": "Variable", - "desc": "Default content renders variables", - "data": { - "bar": "baz" - }, - "template": "{{$foo}}default {{bar}} content{{/foo}}\n", - "expected": "default baz content\n" - }, - { - "name": "Triple Mustache", - "desc": "Default content renders triple mustache variables", - "data": { - "bar": "" - }, - "template": "{{$foo}}default {{{bar}}} content{{/foo}}\n", - "expected": "default content\n" - }, - { - "name": "Sections", - "desc": "Default content renders sections", - "data": { - "bar": { - "baz": "qux" - } - }, - "template": "{{$foo}}default {{#bar}}{{baz}}{{/bar}} content{{/foo}}\n", - "expected": "default qux content\n" - }, - { - "name": "Negative Sections", - "desc": "Default content renders negative sections", - "data": { - "baz": "three" - }, - "template": "{{$foo}}default {{^bar}}{{baz}}{{/bar}} content{{/foo}}\n", - "expected": "default three content\n" - }, - { - "name": "Mustache Injection", - "desc": "Mustache injection in default content", - "data": { - "bar": { - "baz": "{{qux}}" - } - }, - "template": "{{$foo}}default {{#bar}}{{baz}}{{/bar}} content{{/foo}}\n", - "expected": "default {{qux}} content\n" - }, - { - "name": "Inherit", - "desc": "Default content rendered inside included templates", - "data": { - }, - "template": "{{include}}|{{' } - template: | - {{$foo}}default {{{bar}}} content{{/foo}} - expected: | - default content - - - name: Sections - desc: Default content renders sections - data: { bar: {baz: 'qux'} } - template: | - {{$foo}}default {{#bar}}{{baz}}{{/bar}} content{{/foo}} - expected: | - default qux content - - - name: Negative Sections - desc: Default content renders negative sections - data: { baz: 'three' } - template: | - {{$foo}}default {{^bar}}{{baz}}{{/bar}} content{{/foo}} - expected: | - default three content - - - name: Mustache Injection - desc: Mustache injection in default content - data: {bar: {baz: '{{qux}}'} } - template: | - {{$foo}}default {{#bar}}{{baz}}{{/bar}} content{{/foo}} - expected: | - default {{qux}} content - - - name: Inherit - desc: Default content rendered inside included templates - data: { } - template: | - {{include}}|{{" + }, + "template": "{{$foo}}default {{{bar}}} content{{/foo}}\n", + "expected": "default content\n" + }, + { + "name": "Sections", + "desc": "Default content renders sections", + "data": { + "bar": { + "baz": "qux" + } + }, + "template": "{{$foo}}default {{#bar}}{{baz}}{{/bar}} content{{/foo}}\n", + "expected": "default qux content\n" + }, + { + "name": "Negative Sections", + "desc": "Default content renders negative sections", + "data": { + "baz": "three" + }, + "template": "{{$foo}}default {{^bar}}{{baz}}{{/bar}} content{{/foo}}\n", + "expected": "default three content\n" + }, + { + "name": "Mustache Injection", + "desc": "Mustache injection in default content", + "data": { + "bar": { + "baz": "{{qux}}" + } + }, + "template": "{{$foo}}default {{#bar}}{{baz}}{{/bar}} content{{/foo}}\n", + "expected": "default {{qux}} content\n" + }, + { + "name": "Inherit", + "desc": "Default content rendered inside included templates", + "data": { + }, + "template": "{{include}}|{{' } + template: | + {{$foo}}default {{{bar}}} content{{/foo}} + expected: | + default content + + - name: Sections + desc: Default content renders sections + data: { bar: {baz: 'qux'} } + template: | + {{$foo}}default {{#bar}}{{baz}}{{/bar}} content{{/foo}} + expected: | + default qux content + + - name: Negative Sections + desc: Default content renders negative sections + data: { baz: 'three' } + template: | + {{$foo}}default {{^bar}}{{baz}}{{/bar}} content{{/foo}} + expected: | + default three content + + - name: Mustache Injection + desc: Mustache injection in default content + data: {bar: {baz: '{{qux}}'} } + template: | + {{$foo}}default {{#bar}}{{baz}}{{/bar}} content{{/foo}} + expected: | + default {{qux}} content + + - name: Inherit + desc: Default content rendered inside included templates + data: { } + template: | + {{include}}|{{