const chai = require('chai') const Liquid = require('../..') const liquid = new Liquid() const expect = chai.expect chai.use(require('chai-as-promised')) const cases = [ { text: `
{{ 'John' }}
John
{{- 'John' -}}
John
{%- if true -%} yes {%- endif -%}
yes
{% if true %} yes {% endif %}
yes
{% if false %} no {% endif %}
{{- \'John\' -}}
', expected: 'John
' }, { text: '{%- if true -%}yes{%- endif -%}
', expected: 'yes
' }, { text: '{%- if false -%}no{%- endif -%}
', expected: '' }, { text: '{%- if true %} yes {% endif -%}
', expected: 'yes
' }, { text: '{%- if false %} no {% endif -%}
', expected: '' }, { text: '{% if true -%} yes {%- endif %}
', expected: 'yes
' }, { text: '{% if false -%} no {%- endif %}
', expected: '' }, { text: '
{% if true -%} yes {% endif -%}
', expected: 'yes
' }, { text: '{% if false -%} no {% endif -%}
', expected: '' }, { text: '
{%- if true %} yes {%- endif %}
', expected: 'yes
' }, { text: '{%- if false %} no {%- endif %}
', expected: '' }, { text: `
{{- 'John' }}
John
{%- if true %} yes {%- endif %}
yes
{%- if false %} no {%- endif %}
{{ 'John' -}}
John
{% if true -%} yes {% endif -%}
yes
{% if false -%} no {% endif -%}
{%- if true %} yes {% endif -%}
yes
{%- if false %} no {% endif -%}
{% if true -%} yes {%- endif %}
yes
{% if false -%} no {%- endif %}
{{- 'John' -}}
John
{%- if true -%} yes {%- endif -%}
yes
{%- if false -%} no {%- endif -%}
{{- 'John' -}}, {{- '30' -}}
John,30
{%- if true -%} yes {%- endif -%}
yes
{%- if false -%} no {%- endif -%}
{{- 'John' -}} {{- '30' -}}
{{ 'John' -}} {{- '30' }} {{- 'John' }} {{ '30' -}}John30
John30 John 30{{- 'John' -}}
{%- endif -%} {%- endif -%}John
{{- 'John' -}}
{%- endif -%} {% endraw %}{{- 'John' -}}
{%- endif -%}