chore(Handlebars): Refactor test suite (#6378)
parent
4b96097a8d
commit
dd64842375
File diff suppressed because it is too large
Load Diff
|
@ -1,11 +0,0 @@
|
||||||
<div>
|
|
||||||
{{! Foo }}
|
|
||||||
{{#if @foo}}
|
|
||||||
Foo
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{! Bar }}
|
|
||||||
{{#if @bar}}
|
|
||||||
Bar
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
|
@ -0,0 +1,381 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`basic-handlebars.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<script id="entry-template" type="text/x-handlebars-template">
|
||||||
|
<div class="entry">
|
||||||
|
<h1>{{title}}</h1>
|
||||||
|
<div class="body">
|
||||||
|
{{body}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="{{hello}} {{world}}"></div>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<script id="entry-template" type="text/x-handlebars-template">
|
||||||
|
<div class="entry">
|
||||||
|
<h1>
|
||||||
|
{{title}}
|
||||||
|
</h1>
|
||||||
|
<div class="body">
|
||||||
|
{{body}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</script>
|
||||||
|
<div class="{{hello}} {{world}}"></div>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`basic-handlebars.hbs 2`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
singleQuote: true
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<script id="entry-template" type="text/x-handlebars-template">
|
||||||
|
<div class="entry">
|
||||||
|
<h1>{{title}}</h1>
|
||||||
|
<div class="body">
|
||||||
|
{{body}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="{{hello}} {{world}}"></div>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<script id="entry-template" type="text/x-handlebars-template">
|
||||||
|
<div class="entry">
|
||||||
|
<h1>
|
||||||
|
{{title}}
|
||||||
|
</h1>
|
||||||
|
<div class="body">
|
||||||
|
{{body}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</script>
|
||||||
|
<div class="{{hello}} {{world}}"></div>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`component.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<UserGreeting @name="Ricardo" @greeting="Olá" />
|
||||||
|
{{@greeting}}, {{@name}}!
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<UserGreeting
|
||||||
|
@aVeryLongArgumentNameThatIsStillGoing={{@alsoAVeryLongArgument}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Form as |f|>
|
||||||
|
<f.input @title="hello" />
|
||||||
|
<f.input>hello</f.input>
|
||||||
|
</Form>
|
||||||
|
|
||||||
|
<this.label @title="hello" />
|
||||||
|
|
||||||
|
<button onclick={{action next}}>Next</button>
|
||||||
|
|
||||||
|
<button disabled class="disabled"></button>
|
||||||
|
|
||||||
|
<button disabled=disabled class="disabled"></button>
|
||||||
|
|
||||||
|
<img alt="" />
|
||||||
|
|
||||||
|
<div ...attributes>Hello</div>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<UserGreeting @name="Ricardo" @greeting="Olá" />
|
||||||
|
{{@greeting}}
|
||||||
|
,
|
||||||
|
{{@name}}
|
||||||
|
!
|
||||||
|
<div>
|
||||||
|
<UserGreeting
|
||||||
|
@aVeryLongArgumentNameThatIsStillGoing={{@alsoAVeryLongArgument}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<Form as |f|>
|
||||||
|
<f.input @title="hello" />
|
||||||
|
<f.input>
|
||||||
|
hello
|
||||||
|
</f.input>
|
||||||
|
</Form>
|
||||||
|
<this.label @title="hello" />
|
||||||
|
<button onclick={{action next}}>
|
||||||
|
Next
|
||||||
|
</button>
|
||||||
|
<button disabled class="disabled"></button>
|
||||||
|
<button disabled="disabled" class="disabled"></button>
|
||||||
|
<img alt="" />
|
||||||
|
<div ...attributes>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`component.hbs 2`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
singleQuote: true
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<UserGreeting @name="Ricardo" @greeting="Olá" />
|
||||||
|
{{@greeting}}, {{@name}}!
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<UserGreeting
|
||||||
|
@aVeryLongArgumentNameThatIsStillGoing={{@alsoAVeryLongArgument}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Form as |f|>
|
||||||
|
<f.input @title="hello" />
|
||||||
|
<f.input>hello</f.input>
|
||||||
|
</Form>
|
||||||
|
|
||||||
|
<this.label @title="hello" />
|
||||||
|
|
||||||
|
<button onclick={{action next}}>Next</button>
|
||||||
|
|
||||||
|
<button disabled class="disabled"></button>
|
||||||
|
|
||||||
|
<button disabled=disabled class="disabled"></button>
|
||||||
|
|
||||||
|
<img alt="" />
|
||||||
|
|
||||||
|
<div ...attributes>Hello</div>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<UserGreeting @name="Ricardo" @greeting="Olá" />
|
||||||
|
{{@greeting}}
|
||||||
|
,
|
||||||
|
{{@name}}
|
||||||
|
!
|
||||||
|
<div>
|
||||||
|
<UserGreeting
|
||||||
|
@aVeryLongArgumentNameThatIsStillGoing={{@alsoAVeryLongArgument}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<Form as |f|>
|
||||||
|
<f.input @title="hello" />
|
||||||
|
<f.input>
|
||||||
|
hello
|
||||||
|
</f.input>
|
||||||
|
</Form>
|
||||||
|
<this.label @title="hello" />
|
||||||
|
<button onclick={{action next}}>
|
||||||
|
Next
|
||||||
|
</button>
|
||||||
|
<button disabled class="disabled"></button>
|
||||||
|
<button disabled="disabled" class="disabled"></button>
|
||||||
|
<img alt="" />
|
||||||
|
<div ...attributes>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`literals.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
{{mustache true}}
|
||||||
|
{{mustache 5}}
|
||||||
|
{{mustache undefined}}
|
||||||
|
{{mustache null}}
|
||||||
|
<!-- hello world -->
|
||||||
|
{{! Mustache Comment}}
|
||||||
|
{{!-- Mustache Comment }} --}}
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
{{mustache true}}
|
||||||
|
{{mustache 5}}
|
||||||
|
{{mustache undefined}}
|
||||||
|
{{mustache null}}
|
||||||
|
<!-- hello world -->
|
||||||
|
{{! Mustache Comment}}
|
||||||
|
{{!-- Mustache Comment }} --}}
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`literals.hbs 2`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
singleQuote: true
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
{{mustache true}}
|
||||||
|
{{mustache 5}}
|
||||||
|
{{mustache undefined}}
|
||||||
|
{{mustache null}}
|
||||||
|
<!-- hello world -->
|
||||||
|
{{! Mustache Comment}}
|
||||||
|
{{!-- Mustache Comment }} --}}
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
{{mustache true}}
|
||||||
|
{{mustache 5}}
|
||||||
|
{{mustache undefined}}
|
||||||
|
{{mustache null}}
|
||||||
|
<!-- hello world -->
|
||||||
|
{{! Mustache Comment}}
|
||||||
|
{{!-- Mustache Comment }} --}}
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`nested-path.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<div class="entry">
|
||||||
|
<h1>{{title}}</h1>
|
||||||
|
<h2>By {{author.name}}</h2>
|
||||||
|
|
||||||
|
<div class="body">
|
||||||
|
{{body}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<div class="entry">
|
||||||
|
<h1>
|
||||||
|
{{title}}
|
||||||
|
</h1>
|
||||||
|
<h2>
|
||||||
|
By {{author.name}}
|
||||||
|
</h2>
|
||||||
|
<div class="body">
|
||||||
|
{{body}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`nested-path.hbs 2`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
singleQuote: true
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<div class="entry">
|
||||||
|
<h1>{{title}}</h1>
|
||||||
|
<h2>By {{author.name}}</h2>
|
||||||
|
|
||||||
|
<div class="body">
|
||||||
|
{{body}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<div class="entry">
|
||||||
|
<h1>
|
||||||
|
{{title}}
|
||||||
|
</h1>
|
||||||
|
<h2>
|
||||||
|
By {{author.name}}
|
||||||
|
</h2>
|
||||||
|
<div class="body">
|
||||||
|
{{body}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`raw.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<p>{{{raw}}}</p>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<p>
|
||||||
|
{{{raw}}}
|
||||||
|
</p>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`raw.hbs 2`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
singleQuote: true
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<p>{{{raw}}}</p>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<p>
|
||||||
|
{{{raw}}}
|
||||||
|
</p>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`string-literals.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
{{"abc"}}
|
||||||
|
{{'abc'}}
|
||||||
|
{{" \\" \\" ' more double quote than single quote "}}
|
||||||
|
{{' \\' \\' " more single quote than double quote '}}
|
||||||
|
{{' " \\' \\" \\\\ '}}
|
||||||
|
{{" \\" \\' ' \\\\ "}}
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
{{"abc"}}
|
||||||
|
{{"abc"}}
|
||||||
|
{{' " " \\' more double quote than single quote '}}
|
||||||
|
{{" ' ' \\" more single quote than double quote "}}
|
||||||
|
{{' " \\' \\" \\\\ '}}
|
||||||
|
{{" \\" \\' ' \\\\ "}}
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`string-literals.hbs 2`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
singleQuote: true
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
{{"abc"}}
|
||||||
|
{{'abc'}}
|
||||||
|
{{" \\" \\" ' more double quote than single quote "}}
|
||||||
|
{{' \\' \\' " more single quote than double quote '}}
|
||||||
|
{{' " \\' \\" \\\\ '}}
|
||||||
|
{{" \\" \\' ' \\\\ "}}
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
{{'abc'}}
|
||||||
|
{{'abc'}}
|
||||||
|
{{' " " \\' more double quote than single quote '}}
|
||||||
|
{{" ' ' \\" more single quote than double quote "}}
|
||||||
|
{{' " \\' \\" \\\\ '}}
|
||||||
|
{{" \\" \\' ' \\\\ "}}
|
||||||
|
================================================================================
|
||||||
|
`;
|
|
@ -0,0 +1,825 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`block-statement.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
{{#block param hashKey=hashValue as |blockParam|}}
|
||||||
|
Hello
|
||||||
|
{{/block}}
|
||||||
|
|
||||||
|
{{#block almost80CharacterLongPositionalParamThatIsFirstAlmost80Chars helloWorldParam key=here}}
|
||||||
|
{{/block}}
|
||||||
|
|
||||||
|
{{#block param param param param param param param hashKey=hashValue as |blockParam|}}
|
||||||
|
Hello
|
||||||
|
{{/block}}
|
||||||
|
|
||||||
|
{{#block param param param param param param param hashKey=HashValue hashKey=hashValue}}
|
||||||
|
Hello
|
||||||
|
{{/block}}
|
||||||
|
|
||||||
|
{{#block param param param param param param param param param param param param param}}
|
||||||
|
Hello
|
||||||
|
{{/block}}
|
||||||
|
|
||||||
|
{{#block hashKey=HashValue hashKey=hashValue hashKey=HashValue hashKey=hashValue hashKey=HashValue}}
|
||||||
|
Hello
|
||||||
|
{{/block}}
|
||||||
|
|
||||||
|
{{#block}}
|
||||||
|
{{#block}}
|
||||||
|
hello
|
||||||
|
{{/block}}
|
||||||
|
{{/block}}
|
||||||
|
|
||||||
|
{{#block}}
|
||||||
|
{{#block param}}
|
||||||
|
hello
|
||||||
|
{{/block}}
|
||||||
|
{{/block}}
|
||||||
|
|
||||||
|
{{#block param}}
|
||||||
|
{{#block param}}
|
||||||
|
hello
|
||||||
|
{{/block}}
|
||||||
|
{{/block}}
|
||||||
|
|
||||||
|
{{#block}}
|
||||||
|
hello
|
||||||
|
{{/block}}
|
||||||
|
|
||||||
|
<MyComponent as |firstName|>
|
||||||
|
{{firstName}}
|
||||||
|
</MyComponent>
|
||||||
|
|
||||||
|
<MyComponent as |firstName lastName|>
|
||||||
|
{{firstName}} {{lastName}}
|
||||||
|
</MyComponent>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
{{#block param hashKey=hashValue as |blockParam|}}
|
||||||
|
Hello
|
||||||
|
{{/block}}
|
||||||
|
{{#block
|
||||||
|
almost80CharacterLongPositionalParamThatIsFirstAlmost80Chars
|
||||||
|
helloWorldParam
|
||||||
|
key=here
|
||||||
|
}}{{/block}}
|
||||||
|
{{#block
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
hashKey=hashValue as |blockParam|
|
||||||
|
}}
|
||||||
|
Hello
|
||||||
|
{{/block}}
|
||||||
|
{{#block
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
hashKey=HashValue
|
||||||
|
hashKey=hashValue
|
||||||
|
}}
|
||||||
|
Hello
|
||||||
|
{{/block}}
|
||||||
|
{{#block
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
}}
|
||||||
|
Hello
|
||||||
|
{{/block}}
|
||||||
|
{{#block
|
||||||
|
hashKey=HashValue
|
||||||
|
hashKey=hashValue
|
||||||
|
hashKey=HashValue
|
||||||
|
hashKey=hashValue
|
||||||
|
hashKey=HashValue
|
||||||
|
}}
|
||||||
|
Hello
|
||||||
|
{{/block}}
|
||||||
|
{{#block}}
|
||||||
|
{{#block}}
|
||||||
|
hello
|
||||||
|
{{/block}}
|
||||||
|
{{/block}}
|
||||||
|
{{#block}}
|
||||||
|
{{#block param}}
|
||||||
|
hello
|
||||||
|
{{/block}}
|
||||||
|
{{/block}}
|
||||||
|
{{#block param}}
|
||||||
|
{{#block param}}
|
||||||
|
hello
|
||||||
|
{{/block}}
|
||||||
|
{{/block}}
|
||||||
|
{{#block}}
|
||||||
|
hello
|
||||||
|
{{/block}}
|
||||||
|
<MyComponent as |firstName|>
|
||||||
|
{{firstName}}
|
||||||
|
</MyComponent>
|
||||||
|
<MyComponent as |firstName lastName|>
|
||||||
|
{{firstName}} {{lastName}}
|
||||||
|
</MyComponent>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`block-statement.hbs 2`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
singleQuote: true
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
{{#block param hashKey=hashValue as |blockParam|}}
|
||||||
|
Hello
|
||||||
|
{{/block}}
|
||||||
|
|
||||||
|
{{#block almost80CharacterLongPositionalParamThatIsFirstAlmost80Chars helloWorldParam key=here}}
|
||||||
|
{{/block}}
|
||||||
|
|
||||||
|
{{#block param param param param param param param hashKey=hashValue as |blockParam|}}
|
||||||
|
Hello
|
||||||
|
{{/block}}
|
||||||
|
|
||||||
|
{{#block param param param param param param param hashKey=HashValue hashKey=hashValue}}
|
||||||
|
Hello
|
||||||
|
{{/block}}
|
||||||
|
|
||||||
|
{{#block param param param param param param param param param param param param param}}
|
||||||
|
Hello
|
||||||
|
{{/block}}
|
||||||
|
|
||||||
|
{{#block hashKey=HashValue hashKey=hashValue hashKey=HashValue hashKey=hashValue hashKey=HashValue}}
|
||||||
|
Hello
|
||||||
|
{{/block}}
|
||||||
|
|
||||||
|
{{#block}}
|
||||||
|
{{#block}}
|
||||||
|
hello
|
||||||
|
{{/block}}
|
||||||
|
{{/block}}
|
||||||
|
|
||||||
|
{{#block}}
|
||||||
|
{{#block param}}
|
||||||
|
hello
|
||||||
|
{{/block}}
|
||||||
|
{{/block}}
|
||||||
|
|
||||||
|
{{#block param}}
|
||||||
|
{{#block param}}
|
||||||
|
hello
|
||||||
|
{{/block}}
|
||||||
|
{{/block}}
|
||||||
|
|
||||||
|
{{#block}}
|
||||||
|
hello
|
||||||
|
{{/block}}
|
||||||
|
|
||||||
|
<MyComponent as |firstName|>
|
||||||
|
{{firstName}}
|
||||||
|
</MyComponent>
|
||||||
|
|
||||||
|
<MyComponent as |firstName lastName|>
|
||||||
|
{{firstName}} {{lastName}}
|
||||||
|
</MyComponent>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
{{#block param hashKey=hashValue as |blockParam|}}
|
||||||
|
Hello
|
||||||
|
{{/block}}
|
||||||
|
{{#block
|
||||||
|
almost80CharacterLongPositionalParamThatIsFirstAlmost80Chars
|
||||||
|
helloWorldParam
|
||||||
|
key=here
|
||||||
|
}}{{/block}}
|
||||||
|
{{#block
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
hashKey=hashValue as |blockParam|
|
||||||
|
}}
|
||||||
|
Hello
|
||||||
|
{{/block}}
|
||||||
|
{{#block
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
hashKey=HashValue
|
||||||
|
hashKey=hashValue
|
||||||
|
}}
|
||||||
|
Hello
|
||||||
|
{{/block}}
|
||||||
|
{{#block
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
}}
|
||||||
|
Hello
|
||||||
|
{{/block}}
|
||||||
|
{{#block
|
||||||
|
hashKey=HashValue
|
||||||
|
hashKey=hashValue
|
||||||
|
hashKey=HashValue
|
||||||
|
hashKey=hashValue
|
||||||
|
hashKey=HashValue
|
||||||
|
}}
|
||||||
|
Hello
|
||||||
|
{{/block}}
|
||||||
|
{{#block}}
|
||||||
|
{{#block}}
|
||||||
|
hello
|
||||||
|
{{/block}}
|
||||||
|
{{/block}}
|
||||||
|
{{#block}}
|
||||||
|
{{#block param}}
|
||||||
|
hello
|
||||||
|
{{/block}}
|
||||||
|
{{/block}}
|
||||||
|
{{#block param}}
|
||||||
|
{{#block param}}
|
||||||
|
hello
|
||||||
|
{{/block}}
|
||||||
|
{{/block}}
|
||||||
|
{{#block}}
|
||||||
|
hello
|
||||||
|
{{/block}}
|
||||||
|
<MyComponent as |firstName|>
|
||||||
|
{{firstName}}
|
||||||
|
</MyComponent>
|
||||||
|
<MyComponent as |firstName lastName|>
|
||||||
|
{{firstName}} {{lastName}}
|
||||||
|
</MyComponent>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`each.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<div id="comments">
|
||||||
|
{{#each comments}}
|
||||||
|
<h2><a href="/posts/{{permalink}}#{{id}}">{{title}}</a></h2>
|
||||||
|
<div>{{body}}</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<div id="comments">
|
||||||
|
{{#each comments}}
|
||||||
|
<h2>
|
||||||
|
<a href="/posts/{{permalink}}#{{id}}">
|
||||||
|
{{title}}
|
||||||
|
</a>
|
||||||
|
</h2>
|
||||||
|
<div>
|
||||||
|
{{body}}
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`each.hbs 2`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
singleQuote: true
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<div id="comments">
|
||||||
|
{{#each comments}}
|
||||||
|
<h2><a href="/posts/{{permalink}}#{{id}}">{{title}}</a></h2>
|
||||||
|
<div>{{body}}</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<div id="comments">
|
||||||
|
{{#each comments}}
|
||||||
|
<h2>
|
||||||
|
<a href="/posts/{{permalink}}#{{id}}">
|
||||||
|
{{title}}
|
||||||
|
</a>
|
||||||
|
</h2>
|
||||||
|
<div>
|
||||||
|
{{body}}
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`if-else.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<h1>
|
||||||
|
{{#if isAtWork}}
|
||||||
|
Ship that code!
|
||||||
|
{{else if isReading}}
|
||||||
|
You can finish War and Peace eventually...
|
||||||
|
{{else}}
|
||||||
|
Go to bed!
|
||||||
|
{{/if}}
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
{{#if a}}
|
||||||
|
A
|
||||||
|
{{else}}
|
||||||
|
B
|
||||||
|
{{/if}}
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else if c}}
|
||||||
|
d
|
||||||
|
{{else}}
|
||||||
|
e
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else if c}}
|
||||||
|
d
|
||||||
|
{{else}}
|
||||||
|
hello
|
||||||
|
{{#if f}}
|
||||||
|
g
|
||||||
|
{{/if}}
|
||||||
|
e
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else if c}}
|
||||||
|
d
|
||||||
|
{{else if e}}
|
||||||
|
f
|
||||||
|
{{else if g}}
|
||||||
|
h
|
||||||
|
{{else}}
|
||||||
|
j
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else if c}}
|
||||||
|
d
|
||||||
|
{{else}}
|
||||||
|
e
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else if c}}
|
||||||
|
d
|
||||||
|
{{else}}
|
||||||
|
e
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else}}
|
||||||
|
{{#each c as |d|}}
|
||||||
|
e
|
||||||
|
{{/each}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if a}}
|
||||||
|
{{#if b}}
|
||||||
|
ab
|
||||||
|
{{else if c}}
|
||||||
|
ac
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if a}}
|
||||||
|
a
|
||||||
|
<div>b</div>
|
||||||
|
c
|
||||||
|
{{else}}
|
||||||
|
{{#if c}}
|
||||||
|
a
|
||||||
|
b
|
||||||
|
<div>c</div>
|
||||||
|
{{/if}}
|
||||||
|
<div>a</div>
|
||||||
|
b
|
||||||
|
c
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<h1>
|
||||||
|
{{#if isAtWork}}
|
||||||
|
Ship that code!
|
||||||
|
{{else if isReading}}
|
||||||
|
You can finish War and Peace eventually...
|
||||||
|
{{else}}
|
||||||
|
Go to bed!
|
||||||
|
{{/if}}
|
||||||
|
</h1>
|
||||||
|
<h2>
|
||||||
|
{{#if a}}
|
||||||
|
A
|
||||||
|
{{else}}
|
||||||
|
B
|
||||||
|
{{/if}}
|
||||||
|
</h2>
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else if c}}
|
||||||
|
d
|
||||||
|
{{else}}
|
||||||
|
e
|
||||||
|
{{/if}}
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else if c}}
|
||||||
|
d
|
||||||
|
{{else}}
|
||||||
|
hello
|
||||||
|
{{#if f}}
|
||||||
|
g
|
||||||
|
{{/if}}
|
||||||
|
e
|
||||||
|
{{/if}}
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else if c}}
|
||||||
|
d
|
||||||
|
{{else if e}}
|
||||||
|
f
|
||||||
|
{{else if g}}
|
||||||
|
h
|
||||||
|
{{else}}
|
||||||
|
j
|
||||||
|
{{/if}}
|
||||||
|
<div>
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else if c}}
|
||||||
|
d
|
||||||
|
{{else}}
|
||||||
|
e
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else if c}}
|
||||||
|
d
|
||||||
|
{{else}}
|
||||||
|
e
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else}}
|
||||||
|
{{#each c as |d|}}
|
||||||
|
e
|
||||||
|
{{/each}}
|
||||||
|
{{/if}}
|
||||||
|
{{#if a}}
|
||||||
|
{{#if b}}
|
||||||
|
ab
|
||||||
|
{{else if c}}
|
||||||
|
ac
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
{{#if a}}
|
||||||
|
a
|
||||||
|
<div>
|
||||||
|
b
|
||||||
|
</div>
|
||||||
|
c
|
||||||
|
{{else}}
|
||||||
|
{{#if c}}
|
||||||
|
a
|
||||||
|
b
|
||||||
|
<div>
|
||||||
|
c
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
<div>
|
||||||
|
a
|
||||||
|
</div>
|
||||||
|
b
|
||||||
|
c
|
||||||
|
{{/if}}
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`if-else.hbs 2`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
singleQuote: true
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<h1>
|
||||||
|
{{#if isAtWork}}
|
||||||
|
Ship that code!
|
||||||
|
{{else if isReading}}
|
||||||
|
You can finish War and Peace eventually...
|
||||||
|
{{else}}
|
||||||
|
Go to bed!
|
||||||
|
{{/if}}
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
{{#if a}}
|
||||||
|
A
|
||||||
|
{{else}}
|
||||||
|
B
|
||||||
|
{{/if}}
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else if c}}
|
||||||
|
d
|
||||||
|
{{else}}
|
||||||
|
e
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else if c}}
|
||||||
|
d
|
||||||
|
{{else}}
|
||||||
|
hello
|
||||||
|
{{#if f}}
|
||||||
|
g
|
||||||
|
{{/if}}
|
||||||
|
e
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else if c}}
|
||||||
|
d
|
||||||
|
{{else if e}}
|
||||||
|
f
|
||||||
|
{{else if g}}
|
||||||
|
h
|
||||||
|
{{else}}
|
||||||
|
j
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else if c}}
|
||||||
|
d
|
||||||
|
{{else}}
|
||||||
|
e
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else if c}}
|
||||||
|
d
|
||||||
|
{{else}}
|
||||||
|
e
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else}}
|
||||||
|
{{#each c as |d|}}
|
||||||
|
e
|
||||||
|
{{/each}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if a}}
|
||||||
|
{{#if b}}
|
||||||
|
ab
|
||||||
|
{{else if c}}
|
||||||
|
ac
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if a}}
|
||||||
|
a
|
||||||
|
<div>b</div>
|
||||||
|
c
|
||||||
|
{{else}}
|
||||||
|
{{#if c}}
|
||||||
|
a
|
||||||
|
b
|
||||||
|
<div>c</div>
|
||||||
|
{{/if}}
|
||||||
|
<div>a</div>
|
||||||
|
b
|
||||||
|
c
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<h1>
|
||||||
|
{{#if isAtWork}}
|
||||||
|
Ship that code!
|
||||||
|
{{else if isReading}}
|
||||||
|
You can finish War and Peace eventually...
|
||||||
|
{{else}}
|
||||||
|
Go to bed!
|
||||||
|
{{/if}}
|
||||||
|
</h1>
|
||||||
|
<h2>
|
||||||
|
{{#if a}}
|
||||||
|
A
|
||||||
|
{{else}}
|
||||||
|
B
|
||||||
|
{{/if}}
|
||||||
|
</h2>
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else if c}}
|
||||||
|
d
|
||||||
|
{{else}}
|
||||||
|
e
|
||||||
|
{{/if}}
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else if c}}
|
||||||
|
d
|
||||||
|
{{else}}
|
||||||
|
hello
|
||||||
|
{{#if f}}
|
||||||
|
g
|
||||||
|
{{/if}}
|
||||||
|
e
|
||||||
|
{{/if}}
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else if c}}
|
||||||
|
d
|
||||||
|
{{else if e}}
|
||||||
|
f
|
||||||
|
{{else if g}}
|
||||||
|
h
|
||||||
|
{{else}}
|
||||||
|
j
|
||||||
|
{{/if}}
|
||||||
|
<div>
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else if c}}
|
||||||
|
d
|
||||||
|
{{else}}
|
||||||
|
e
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else if c}}
|
||||||
|
d
|
||||||
|
{{else}}
|
||||||
|
e
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{#if a}}
|
||||||
|
b
|
||||||
|
{{else}}
|
||||||
|
{{#each c as |d|}}
|
||||||
|
e
|
||||||
|
{{/each}}
|
||||||
|
{{/if}}
|
||||||
|
{{#if a}}
|
||||||
|
{{#if b}}
|
||||||
|
ab
|
||||||
|
{{else if c}}
|
||||||
|
ac
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
{{#if a}}
|
||||||
|
a
|
||||||
|
<div>
|
||||||
|
b
|
||||||
|
</div>
|
||||||
|
c
|
||||||
|
{{else}}
|
||||||
|
{{#if c}}
|
||||||
|
a
|
||||||
|
b
|
||||||
|
<div>
|
||||||
|
c
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
<div>
|
||||||
|
a
|
||||||
|
</div>
|
||||||
|
b
|
||||||
|
c
|
||||||
|
{{/if}}
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`loop.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<ul>
|
||||||
|
{{#each speakers key="@index" as |speaker|}}
|
||||||
|
<li>{{speaker}}</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<ul>
|
||||||
|
{{#each speakers key="@index" as |speaker|}}
|
||||||
|
<li>
|
||||||
|
{{speaker}}
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`loop.hbs 2`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
singleQuote: true
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<ul>
|
||||||
|
{{#each speakers key="@index" as |speaker|}}
|
||||||
|
<li>{{speaker}}</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<ul>
|
||||||
|
{{#each speakers key='@index' as |speaker|}}
|
||||||
|
<li>
|
||||||
|
{{speaker}}
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
================================================================================
|
||||||
|
`;
|
|
@ -1,3 +1,21 @@
|
||||||
|
<h1>
|
||||||
|
{{#if isAtWork}}
|
||||||
|
Ship that code!
|
||||||
|
{{else if isReading}}
|
||||||
|
You can finish War and Peace eventually...
|
||||||
|
{{else}}
|
||||||
|
Go to bed!
|
||||||
|
{{/if}}
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
{{#if a}}
|
||||||
|
A
|
||||||
|
{{else}}
|
||||||
|
B
|
||||||
|
{{/if}}
|
||||||
|
</h2>
|
||||||
|
|
||||||
{{#if a}}
|
{{#if a}}
|
||||||
b
|
b
|
||||||
{{else if c}}
|
{{else if c}}
|
|
@ -0,0 +1,2 @@
|
||||||
|
run_spec(__dirname, ["glimmer"]);
|
||||||
|
run_spec(__dirname, ["glimmer"], { singleQuote: true });
|
|
@ -1,5 +1,5 @@
|
||||||
<ul>
|
<ul>
|
||||||
{{#each speakers key="@index" as |speaker|}}
|
{{#each speakers key="@index" as |speaker|}}
|
||||||
<li>{{speaker}}</li>
|
<li>{{speaker}}</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
|
@ -0,0 +1,44 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`comments.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<div>
|
||||||
|
{{! Foo }}
|
||||||
|
{{#if @foo}}
|
||||||
|
Foo
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{! Bar }}
|
||||||
|
{{#if @bar}}
|
||||||
|
Bar
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry">
|
||||||
|
{{! This comment will not be in the output }}
|
||||||
|
{{!-- This comment as }} and will not be in the output --}}
|
||||||
|
<!-- This comment will be in the output -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<div>
|
||||||
|
{{! Foo }}
|
||||||
|
{{#if @foo}}
|
||||||
|
Foo
|
||||||
|
{{/if}}
|
||||||
|
{{! Bar }}
|
||||||
|
{{#if @bar}}
|
||||||
|
Bar
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
<div class="entry">
|
||||||
|
{{! This comment will not be in the output }}
|
||||||
|
{{!-- This comment as }} and will not be in the output --}}
|
||||||
|
<!-- This comment will be in the output -->
|
||||||
|
</div>
|
||||||
|
================================================================================
|
||||||
|
`;
|
|
@ -1,3 +1,15 @@
|
||||||
|
<div>
|
||||||
|
{{! Foo }}
|
||||||
|
{{#if @foo}}
|
||||||
|
Foo
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{! Bar }}
|
||||||
|
{{#if @bar}}
|
||||||
|
Bar
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="entry">
|
<div class="entry">
|
||||||
{{! This comment will not be in the output }}
|
{{! This comment will not be in the output }}
|
||||||
{{!-- This comment as }} and will not be in the output --}}
|
{{!-- This comment as }} and will not be in the output --}}
|
|
@ -0,0 +1,118 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`concat-statement.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<div class="hello {{if goodbye true}}">
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="hello {{if goodbye true}} {{if goodbye false}} {{if goodbye true}} {{if goodbye false}} {{if goodbye true}}">
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a href="/{{url}}/{{url}}"></a>
|
||||||
|
|
||||||
|
<div class=" class-a{{myClass}}"></div>
|
||||||
|
<div class=" class-b {{myClass}}"></div>
|
||||||
|
<div class=" {{myClass}}class-c"></div>
|
||||||
|
<div class=" {{myClass}} class-d"></div>
|
||||||
|
<div class=" class-e{{myClass}} class-f"></div>
|
||||||
|
<div class=" class-g{{myClass}}class-h "></div>
|
||||||
|
<div class=" class-i {{myClass}}class-j"></div>
|
||||||
|
<div class="class-k {{myClass}} class-l"></div>
|
||||||
|
<div class=" class-m {{myClass}} class-n {{myClass}}class-o "></div>
|
||||||
|
<div class=" class-p class-q"></div>
|
||||||
|
=====================================output=====================================
|
||||||
|
<div class="hello {{if goodbye true}}">
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="hello
|
||||||
|
{{if goodbye true}}
|
||||||
|
|
||||||
|
{{if goodbye false}}
|
||||||
|
|
||||||
|
{{if goodbye true}}
|
||||||
|
|
||||||
|
{{if goodbye false}}
|
||||||
|
|
||||||
|
{{if goodbye true}}"
|
||||||
|
>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
<a href="/{{url}}/{{url}}"></a>
|
||||||
|
<div class="class-a{{myClass}}"></div>
|
||||||
|
<div class="class-b {{myClass}}"></div>
|
||||||
|
<div class="{{myClass}}class-c"></div>
|
||||||
|
<div class="{{myClass}} class-d"></div>
|
||||||
|
<div class="class-e{{myClass}} class-f"></div>
|
||||||
|
<div class="class-g{{myClass}}class-h"></div>
|
||||||
|
<div class="class-i {{myClass}}class-j"></div>
|
||||||
|
<div class="class-k {{myClass}} class-l"></div>
|
||||||
|
<div class="class-m {{myClass}} class-n {{myClass}}class-o"></div>
|
||||||
|
<div class="class-p class-q"></div>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`concat-statement.hbs 2`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
singleQuote: true
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<div class="hello {{if goodbye true}}">
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="hello {{if goodbye true}} {{if goodbye false}} {{if goodbye true}} {{if goodbye false}} {{if goodbye true}}">
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a href="/{{url}}/{{url}}"></a>
|
||||||
|
|
||||||
|
<div class=" class-a{{myClass}}"></div>
|
||||||
|
<div class=" class-b {{myClass}}"></div>
|
||||||
|
<div class=" {{myClass}}class-c"></div>
|
||||||
|
<div class=" {{myClass}} class-d"></div>
|
||||||
|
<div class=" class-e{{myClass}} class-f"></div>
|
||||||
|
<div class=" class-g{{myClass}}class-h "></div>
|
||||||
|
<div class=" class-i {{myClass}}class-j"></div>
|
||||||
|
<div class="class-k {{myClass}} class-l"></div>
|
||||||
|
<div class=" class-m {{myClass}} class-n {{myClass}}class-o "></div>
|
||||||
|
<div class=" class-p class-q"></div>
|
||||||
|
=====================================output=====================================
|
||||||
|
<div class="hello {{if goodbye true}}">
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="hello
|
||||||
|
{{if goodbye true}}
|
||||||
|
|
||||||
|
{{if goodbye false}}
|
||||||
|
|
||||||
|
{{if goodbye true}}
|
||||||
|
|
||||||
|
{{if goodbye false}}
|
||||||
|
|
||||||
|
{{if goodbye true}}"
|
||||||
|
>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
<a href="/{{url}}/{{url}}"></a>
|
||||||
|
<div class="class-a{{myClass}}"></div>
|
||||||
|
<div class="class-b {{myClass}}"></div>
|
||||||
|
<div class="{{myClass}}class-c"></div>
|
||||||
|
<div class="{{myClass}} class-d"></div>
|
||||||
|
<div class="class-e{{myClass}} class-f"></div>
|
||||||
|
<div class="class-g{{myClass}}class-h"></div>
|
||||||
|
<div class="class-i {{myClass}}class-j"></div>
|
||||||
|
<div class="class-k {{myClass}} class-l"></div>
|
||||||
|
<div class="class-m {{myClass}} class-n {{myClass}}class-o"></div>
|
||||||
|
<div class="class-p class-q"></div>
|
||||||
|
================================================================================
|
||||||
|
`;
|
|
@ -0,0 +1,2 @@
|
||||||
|
run_spec(__dirname, ["glimmer"]);
|
||||||
|
run_spec(__dirname, ["glimmer"], { singleQuote: true });
|
|
@ -0,0 +1,152 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`element-node.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<div class="attribute" {{modifier}} {{! comment}}>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
hi
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
A long enough string to trigger a line break that would prevent wrapping.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
A long enough string to trigger a line break that would prevent wrapping more.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
A long enough string to trigger a line break that would prevent wrapping more and more.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{#block}}
|
||||||
|
{{hello}}
|
||||||
|
{{/block}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{hello}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div></div>
|
||||||
|
<img />
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<div class="attribute" {{modifier}} {{! comment}}>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
hi
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
A long enough string to trigger a line break that would prevent wrapping.
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
A long enough string to trigger a line break that would prevent wrapping more.
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
A long enough string to trigger a line break that would prevent wrapping more and more.
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{{#block}}
|
||||||
|
{{hello}}
|
||||||
|
{{/block}}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{{hello}}
|
||||||
|
</div>
|
||||||
|
<div></div>
|
||||||
|
<img />
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`element-node.hbs 2`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
singleQuote: true
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<div class="attribute" {{modifier}} {{! comment}}>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
hi
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
A long enough string to trigger a line break that would prevent wrapping.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
A long enough string to trigger a line break that would prevent wrapping more.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
A long enough string to trigger a line break that would prevent wrapping more and more.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{#block}}
|
||||||
|
{{hello}}
|
||||||
|
{{/block}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{hello}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div></div>
|
||||||
|
<img />
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<div class="attribute" {{modifier}} {{! comment}}>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
hi
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
A long enough string to trigger a line break that would prevent wrapping.
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
A long enough string to trigger a line break that would prevent wrapping more.
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
A long enough string to trigger a line break that would prevent wrapping more and more.
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{{#block}}
|
||||||
|
{{hello}}
|
||||||
|
{{/block}}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{{hello}}
|
||||||
|
</div>
|
||||||
|
<div></div>
|
||||||
|
<img />
|
||||||
|
================================================================================
|
||||||
|
`;
|
|
@ -0,0 +1,2 @@
|
||||||
|
run_spec(__dirname, ["glimmer"]);
|
||||||
|
run_spec(__dirname, ["glimmer"], { singleQuote: true });
|
|
@ -0,0 +1,30 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`html-entities.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<p>Some escaped characters: < > &</p>
|
||||||
|
=====================================output=====================================
|
||||||
|
<p>
|
||||||
|
Some escaped characters: < > &
|
||||||
|
</p>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`html-entities.hbs 2`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
singleQuote: true
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<p>Some escaped characters: < > &</p>
|
||||||
|
=====================================output=====================================
|
||||||
|
<p>
|
||||||
|
Some escaped characters: < > &
|
||||||
|
</p>
|
||||||
|
================================================================================
|
||||||
|
`;
|
|
@ -0,0 +1,2 @@
|
||||||
|
run_spec(__dirname, ["glimmer"]);
|
||||||
|
run_spec(__dirname, ["glimmer"], { singleQuote: true });
|
|
@ -0,0 +1,80 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`empty-with-no-trailing-newline.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`empty-with-no-trailing-newline.hbs 2`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
singleQuote: true
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`empty-with-trailing-newline.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`empty-with-trailing-newline.hbs 2`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
singleQuote: true
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`end-of-line-last.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
a bare string to hightlight eol last handling
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
a bare string to hightlight eol last handling
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`end-of-line-last.hbs 2`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
singleQuote: true
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
a bare string to hightlight eol last handling
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
a bare string to hightlight eol last handling
|
||||||
|
================================================================================
|
||||||
|
`;
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
a bare string to hightlight eol last handling
|
|
@ -0,0 +1,2 @@
|
||||||
|
run_spec(__dirname, ["glimmer"]);
|
||||||
|
run_spec(__dirname, ["glimmer"], { singleQuote: true });
|
|
@ -0,0 +1,148 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`element-modifier-statement.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<div {{hello param hash=key}} {{goodbye param}}>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div {{hello param param param param param param param param param param param param}}>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div {{hello hashPair=value hashPair=value hashPair=value hashPair=value hashPair=value}}>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div {{hello param param param param hashPair=value hashPair=value hashPair=value hashPair=value hashPair=value}}>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<div {{hello param hash=key}} {{goodbye param}}>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
{{hello
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
{{hello
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
{{hello
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`element-modifier-statement.hbs 2`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
singleQuote: true
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<div {{hello param hash=key}} {{goodbye param}}>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div {{hello param param param param param param param param param param param param}}>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div {{hello hashPair=value hashPair=value hashPair=value hashPair=value hashPair=value}}>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div {{hello param param param param hashPair=value hashPair=value hashPair=value hashPair=value hashPair=value}}>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<div {{hello param hash=key}} {{goodbye param}}>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
{{hello
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
{{hello
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
{{hello
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Hello
|
||||||
|
</div>
|
||||||
|
================================================================================
|
||||||
|
`;
|
|
@ -0,0 +1,2 @@
|
||||||
|
run_spec(__dirname, ["glimmer"]);
|
||||||
|
run_spec(__dirname, ["glimmer"], { singleQuote: true });
|
|
@ -0,0 +1,134 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`test.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<p>
|
||||||
|
Welcome to the <strong>Ember.js Guides</strong>.
|
||||||
|
This documentation will take you from total beginner to Ember expert.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
{{!-- newlines text --}}
|
||||||
|
<div>
|
||||||
|
hi
|
||||||
|
there
|
||||||
|
how
|
||||||
|
|
||||||
|
are you
|
||||||
|
|
||||||
|
|
||||||
|
are you fine today?
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- newlines text spaced --}}
|
||||||
|
<div>
|
||||||
|
|
||||||
|
space above
|
||||||
|
|
||||||
|
space below
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- newlines elems spaced --}}
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<span>space above</span>
|
||||||
|
|
||||||
|
<span>space below</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- newlines mixed --}}
|
||||||
|
<div>
|
||||||
|
hi
|
||||||
|
<span>there</span>
|
||||||
|
|
||||||
|
how
|
||||||
|
|
||||||
|
are <strong>you</strong>
|
||||||
|
|
||||||
|
|
||||||
|
are you fine today?
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- newlines elems --}}
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
|
||||||
|
<div></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
hi
|
||||||
|
|
||||||
|
|
||||||
|
<div></div>
|
||||||
|
|
||||||
|
|
||||||
|
<Big />
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<p>
|
||||||
|
Welcome to the<strong>
|
||||||
|
Ember.js Guides
|
||||||
|
</strong>
|
||||||
|
.
|
||||||
|
This documentation will take you from total beginner to Ember expert.
|
||||||
|
</p>
|
||||||
|
{{! newlines text }}
|
||||||
|
<div>
|
||||||
|
hi
|
||||||
|
there
|
||||||
|
how
|
||||||
|
|
||||||
|
are you
|
||||||
|
|
||||||
|
|
||||||
|
are you fine today?
|
||||||
|
</div>
|
||||||
|
{{! newlines text spaced }}
|
||||||
|
<div>
|
||||||
|
space above
|
||||||
|
|
||||||
|
space below
|
||||||
|
</div>
|
||||||
|
{{! newlines elems spaced }}
|
||||||
|
<div>
|
||||||
|
<span>
|
||||||
|
space above
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
space below
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
{{! newlines mixed }}
|
||||||
|
<div>
|
||||||
|
hi<span>
|
||||||
|
there
|
||||||
|
</span>
|
||||||
|
how
|
||||||
|
|
||||||
|
are<strong>
|
||||||
|
you
|
||||||
|
</strong>
|
||||||
|
are you fine today?
|
||||||
|
</div>
|
||||||
|
{{! newlines elems }}
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<div></div>
|
||||||
|
</div>
|
||||||
|
hi<div></div>
|
||||||
|
<Big />
|
||||||
|
</div>
|
||||||
|
================================================================================
|
||||||
|
`;
|
|
@ -0,0 +1 @@
|
||||||
|
run_spec(__dirname, ["glimmer"]);
|
|
@ -0,0 +1,69 @@
|
||||||
|
<p>
|
||||||
|
Welcome to the <strong>Ember.js Guides</strong>.
|
||||||
|
This documentation will take you from total beginner to Ember expert.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
{{!-- newlines text --}}
|
||||||
|
<div>
|
||||||
|
hi
|
||||||
|
there
|
||||||
|
how
|
||||||
|
|
||||||
|
are you
|
||||||
|
|
||||||
|
|
||||||
|
are you fine today?
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- newlines text spaced --}}
|
||||||
|
<div>
|
||||||
|
|
||||||
|
space above
|
||||||
|
|
||||||
|
space below
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- newlines elems spaced --}}
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<span>space above</span>
|
||||||
|
|
||||||
|
<span>space below</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- newlines mixed --}}
|
||||||
|
<div>
|
||||||
|
hi
|
||||||
|
<span>there</span>
|
||||||
|
|
||||||
|
how
|
||||||
|
|
||||||
|
are <strong>you</strong>
|
||||||
|
|
||||||
|
|
||||||
|
are you fine today?
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- newlines elems --}}
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
|
||||||
|
<div></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
hi
|
||||||
|
|
||||||
|
|
||||||
|
<div></div>
|
||||||
|
|
||||||
|
|
||||||
|
<Big />
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
|
@ -0,0 +1,194 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`sub-expressions.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<div
|
||||||
|
{{mustache
|
||||||
|
(concat
|
||||||
|
(service)
|
||||||
|
(helper param hashPair=Value)
|
||||||
|
(largeNameHelper param param param param hashPair=value hashPair=value hashPair=Value)
|
||||||
|
hashPair=(helper param param param param param param hashPair=value hashPair=value hashPair=value)
|
||||||
|
hashPair=(does not need a line break due to being under 80 chars long)
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
></div>
|
||||||
|
|
||||||
|
{{#block
|
||||||
|
(concat
|
||||||
|
(service)
|
||||||
|
(helper param hashPair=Value)
|
||||||
|
(largeNameHelper param param param param hashPair=value hashPair=value hashPair=Value)
|
||||||
|
hashPair=(helper param param param param param param hashPair=value hashPair=value hashPair=value)
|
||||||
|
hashPair=(does not need a line break due to being under 80 chars long)
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
|
||||||
|
{{/block}}
|
||||||
|
|
||||||
|
{{foobar-sub-component/foobar-foo
|
||||||
|
hook="stringLiteral"
|
||||||
|
foo=
|
||||||
|
(t
|
||||||
|
(concat "stringLiteral" (get blockParam "stringLiteral") hash=hash hash=hash)
|
||||||
|
foo=(simple-helper (hash hashKey=blockParam.foo assignParam=blockParam.bar))
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<div
|
||||||
|
{{mustache
|
||||||
|
(concat
|
||||||
|
(service)
|
||||||
|
(helper param hashPair=Value)
|
||||||
|
(largeNameHelper
|
||||||
|
param param param param hashPair=value hashPair=value hashPair=Value
|
||||||
|
)
|
||||||
|
hashPair=(helper
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
)
|
||||||
|
hashPair=(does not need a line break due to being under 80 chars long)
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
></div>
|
||||||
|
{{#block
|
||||||
|
(concat
|
||||||
|
(service)
|
||||||
|
(helper param hashPair=Value)
|
||||||
|
(largeNameHelper
|
||||||
|
param param param param hashPair=value hashPair=value hashPair=Value
|
||||||
|
)
|
||||||
|
hashPair=(helper
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
)
|
||||||
|
hashPair=(does not need a line break due to being under 80 chars long)
|
||||||
|
)
|
||||||
|
}}{{/block}}
|
||||||
|
{{foobar-sub-component/foobar-foo
|
||||||
|
hook="stringLiteral"
|
||||||
|
foo=(t
|
||||||
|
(concat
|
||||||
|
"stringLiteral" (get blockParam "stringLiteral") hash=hash hash=hash
|
||||||
|
)
|
||||||
|
foo=(simple-helper (hash hashKey=blockParam.foo assignParam=blockParam.bar))
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`sub-expressions.hbs 2`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
singleQuote: true
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<div
|
||||||
|
{{mustache
|
||||||
|
(concat
|
||||||
|
(service)
|
||||||
|
(helper param hashPair=Value)
|
||||||
|
(largeNameHelper param param param param hashPair=value hashPair=value hashPair=Value)
|
||||||
|
hashPair=(helper param param param param param param hashPair=value hashPair=value hashPair=value)
|
||||||
|
hashPair=(does not need a line break due to being under 80 chars long)
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
></div>
|
||||||
|
|
||||||
|
{{#block
|
||||||
|
(concat
|
||||||
|
(service)
|
||||||
|
(helper param hashPair=Value)
|
||||||
|
(largeNameHelper param param param param hashPair=value hashPair=value hashPair=Value)
|
||||||
|
hashPair=(helper param param param param param param hashPair=value hashPair=value hashPair=value)
|
||||||
|
hashPair=(does not need a line break due to being under 80 chars long)
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
|
||||||
|
{{/block}}
|
||||||
|
|
||||||
|
{{foobar-sub-component/foobar-foo
|
||||||
|
hook="stringLiteral"
|
||||||
|
foo=
|
||||||
|
(t
|
||||||
|
(concat "stringLiteral" (get blockParam "stringLiteral") hash=hash hash=hash)
|
||||||
|
foo=(simple-helper (hash hashKey=blockParam.foo assignParam=blockParam.bar))
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<div
|
||||||
|
{{mustache
|
||||||
|
(concat
|
||||||
|
(service)
|
||||||
|
(helper param hashPair=Value)
|
||||||
|
(largeNameHelper
|
||||||
|
param param param param hashPair=value hashPair=value hashPair=Value
|
||||||
|
)
|
||||||
|
hashPair=(helper
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
)
|
||||||
|
hashPair=(does not need a line break due to being under 80 chars long)
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
></div>
|
||||||
|
{{#block
|
||||||
|
(concat
|
||||||
|
(service)
|
||||||
|
(helper param hashPair=Value)
|
||||||
|
(largeNameHelper
|
||||||
|
param param param param hashPair=value hashPair=value hashPair=Value
|
||||||
|
)
|
||||||
|
hashPair=(helper
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
param
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
hashPair=value
|
||||||
|
)
|
||||||
|
hashPair=(does not need a line break due to being under 80 chars long)
|
||||||
|
)
|
||||||
|
}}{{/block}}
|
||||||
|
{{foobar-sub-component/foobar-foo
|
||||||
|
hook='stringLiteral'
|
||||||
|
foo=(t
|
||||||
|
(concat
|
||||||
|
'stringLiteral' (get blockParam 'stringLiteral') hash=hash hash=hash
|
||||||
|
)
|
||||||
|
foo=(simple-helper (hash hashKey=blockParam.foo assignParam=blockParam.bar))
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
================================================================================
|
||||||
|
`;
|
|
@ -0,0 +1,2 @@
|
||||||
|
run_spec(__dirname, ["glimmer"]);
|
||||||
|
run_spec(__dirname, ["glimmer"], { singleQuote: true });
|
|
@ -0,0 +1,366 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`test.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 80
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
{{!-- Wrapping text --}}
|
||||||
|
<div>
|
||||||
|
Some text that would need to wrap on to a new line in order to display correctly and nicely
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- Wrapping tags --}}
|
||||||
|
<div>
|
||||||
|
<first>f</first> <first>f</first> <first>f</first> <first>f</first> <first>f</first> <first>f</first>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- Wrapping tags --}}
|
||||||
|
<div>
|
||||||
|
<first>f</first><first>f</first><first>f</first><first>f</first><first>f</first><first>f</first>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- Wrapping tags --}}
|
||||||
|
<div>
|
||||||
|
<first>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</first> <first>f</first>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
before<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at mollis lorem.</div>after
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
before{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}{stuff}{stuff}after{stuff}after
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
before {{stuff}} after {{stuff}} after {{stuff}} after {{stuff}} after {{stuff}} after {{stuff}} {{stuff}} {{stuff}} after {{stuff}} after
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
Please state your <b>name</b> and <b>occupation</b> for the board of <b>school</b> directors.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
First second third
|
||||||
|
<div attr="a very long string attribute that will overflow because it is very long">Something</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
First
|
||||||
|
</div>
|
||||||
|
Second
|
||||||
|
<div>
|
||||||
|
Third
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
First <div>
|
||||||
|
Second
|
||||||
|
</div> Third
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- leading whitespace --}}
|
||||||
|
<div> First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh Twelfth Thirteenth Fourteenth</div>
|
||||||
|
|
||||||
|
{{!-- trailing whitespace --}}
|
||||||
|
<div>First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh Twelfth Thirteenth Fourteenth </div>
|
||||||
|
|
||||||
|
{{!-- no leading or trailing whitespace --}}
|
||||||
|
<div>First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh Twelfth Thirteenth Fourteenth</div>
|
||||||
|
|
||||||
|
{{!-- translation leave text around tag --}}
|
||||||
|
<div>
|
||||||
|
<span>
|
||||||
|
First
|
||||||
|
</span>,
|
||||||
|
(<span>
|
||||||
|
Second
|
||||||
|
</span>)
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<span>
|
||||||
|
First second third fourth fifth sixth seventh
|
||||||
|
</span>,
|
||||||
|
(<span>
|
||||||
|
Second
|
||||||
|
</span>)
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- this really should split across lines --}}
|
||||||
|
<div>
|
||||||
|
before{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- solitary whitespace --}}
|
||||||
|
<div first="first" second="second" third="third" fourth="fourth" fifth="fifth" sixth="sixth"> </div>
|
||||||
|
|
||||||
|
{{!-- whitespace on newline --}}
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
First
|
||||||
|
</div> <div>
|
||||||
|
Second
|
||||||
|
</div> <div>
|
||||||
|
Third
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- around multiline element --}}
|
||||||
|
<div>Before <div>{"Enough text to make this element wrap on to multiple lines when formatting"}</div> After</div>
|
||||||
|
|
||||||
|
{{!-- around multiline element second pass --}}
|
||||||
|
<div>
|
||||||
|
Before{" "}
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
"Enough text to make this element wrap on to multiple lines when formatting"
|
||||||
|
}
|
||||||
|
</div>{" "}
|
||||||
|
After
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- dont preserve blank lines when contains text --}}
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<div>Zeroth</div>
|
||||||
|
|
||||||
|
<div>First</div>
|
||||||
|
|
||||||
|
Second
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- multiple expressions --}}
|
||||||
|
<div>
|
||||||
|
{{header}}
|
||||||
|
{{body}}
|
||||||
|
{{footer}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- single expression child tags --}}
|
||||||
|
<div>
|
||||||
|
You currently have <strong>{{dashboardStr}}</strong> and <strong>{{userStr}}</strong>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- expression does not break --}}
|
||||||
|
<div>texty text text text text text text text text text text text {{this.props.type}} </div>
|
||||||
|
|
||||||
|
// FIXME
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
{{! Wrapping text }}
|
||||||
|
<div>
|
||||||
|
Some text that would need to wrap on to a new line in order to display correctly and nicely
|
||||||
|
</div>
|
||||||
|
{{! Wrapping tags }}
|
||||||
|
<div>
|
||||||
|
<first>
|
||||||
|
f
|
||||||
|
</first>
|
||||||
|
<first>
|
||||||
|
f
|
||||||
|
</first>
|
||||||
|
<first>
|
||||||
|
f
|
||||||
|
</first>
|
||||||
|
<first>
|
||||||
|
f
|
||||||
|
</first>
|
||||||
|
<first>
|
||||||
|
f
|
||||||
|
</first>
|
||||||
|
<first>
|
||||||
|
f
|
||||||
|
</first>
|
||||||
|
</div>
|
||||||
|
{{! Wrapping tags }}
|
||||||
|
<div>
|
||||||
|
<first>
|
||||||
|
f
|
||||||
|
</first>
|
||||||
|
<first>
|
||||||
|
f
|
||||||
|
</first>
|
||||||
|
<first>
|
||||||
|
f
|
||||||
|
</first>
|
||||||
|
<first>
|
||||||
|
f
|
||||||
|
</first>
|
||||||
|
<first>
|
||||||
|
f
|
||||||
|
</first>
|
||||||
|
<first>
|
||||||
|
f
|
||||||
|
</first>
|
||||||
|
</div>
|
||||||
|
{{! Wrapping tags }}
|
||||||
|
<div>
|
||||||
|
<first>
|
||||||
|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
</first>
|
||||||
|
<first>
|
||||||
|
f
|
||||||
|
</first>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
before<div>
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at mollis lorem.
|
||||||
|
</div>
|
||||||
|
after
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
before{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}{stuff}{stuff}after{stuff}after
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
before {{stuff}}after {{stuff}}after {{stuff}}after {{stuff}}after {{stuff
|
||||||
|
}}after {{stuff}} {{stuff}} {{stuff}}after {{stuff}}after
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Please state your<b>
|
||||||
|
name
|
||||||
|
</b>
|
||||||
|
and<b>
|
||||||
|
occupation
|
||||||
|
</b>
|
||||||
|
for the board of<b>
|
||||||
|
school
|
||||||
|
</b>
|
||||||
|
directors.
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
First second third<div
|
||||||
|
attr="a very long string attribute that will overflow because it is very long"
|
||||||
|
>
|
||||||
|
Something
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
First
|
||||||
|
</div>
|
||||||
|
Second<div>
|
||||||
|
Third
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
First<div>
|
||||||
|
Second
|
||||||
|
</div>
|
||||||
|
Third
|
||||||
|
</div>
|
||||||
|
{{! leading whitespace }}
|
||||||
|
<div>
|
||||||
|
First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh Twelfth Thirteenth Fourteenth
|
||||||
|
</div>
|
||||||
|
{{! trailing whitespace }}
|
||||||
|
<div>
|
||||||
|
First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh Twelfth Thirteenth Fourteenth
|
||||||
|
</div>
|
||||||
|
{{! no leading or trailing whitespace }}
|
||||||
|
<div>
|
||||||
|
First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh Twelfth Thirteenth Fourteenth
|
||||||
|
</div>
|
||||||
|
{{! translation leave text around tag }}
|
||||||
|
<div>
|
||||||
|
<span>
|
||||||
|
First
|
||||||
|
</span>
|
||||||
|
,
|
||||||
|
(<span>
|
||||||
|
Second
|
||||||
|
</span>
|
||||||
|
)
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span>
|
||||||
|
First second third fourth fifth sixth seventh
|
||||||
|
</span>
|
||||||
|
,
|
||||||
|
(<span>
|
||||||
|
Second
|
||||||
|
</span>
|
||||||
|
)
|
||||||
|
</div>
|
||||||
|
{{! this really should split across lines }}
|
||||||
|
<div>
|
||||||
|
before{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff
|
||||||
|
}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff
|
||||||
|
}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after
|
||||||
|
</div>
|
||||||
|
{{! solitary whitespace }}
|
||||||
|
<div
|
||||||
|
first="first"
|
||||||
|
second="second"
|
||||||
|
third="third"
|
||||||
|
fourth="fourth"
|
||||||
|
fifth="fifth"
|
||||||
|
sixth="sixth"
|
||||||
|
>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{{! whitespace on newline }}
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
First
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Second
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Third
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{! around multiline element }}
|
||||||
|
<div>
|
||||||
|
Before<div>
|
||||||
|
{"Enough text to make this element wrap on to multiple lines when formatting"}
|
||||||
|
</div>
|
||||||
|
After
|
||||||
|
</div>
|
||||||
|
{{! around multiline element second pass }}
|
||||||
|
<div>
|
||||||
|
Before{" "}<div>
|
||||||
|
{
|
||||||
|
"Enough text to make this element wrap on to multiple lines when formatting"
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
{" "}
|
||||||
|
After
|
||||||
|
</div>
|
||||||
|
{{! dont preserve blank lines when contains text }}
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
Zeroth
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
First
|
||||||
|
</div>
|
||||||
|
Second
|
||||||
|
</div>
|
||||||
|
{{! multiple expressions }}
|
||||||
|
<div>
|
||||||
|
{{header}} {{body}} {{footer}}
|
||||||
|
</div>
|
||||||
|
{{! single expression child tags }}
|
||||||
|
<div>
|
||||||
|
You currently have<strong>
|
||||||
|
{{dashboardStr}}
|
||||||
|
</strong>
|
||||||
|
and<strong>
|
||||||
|
{{userStr}}
|
||||||
|
</strong>
|
||||||
|
</div>
|
||||||
|
{{! expression does not break }}
|
||||||
|
<div>
|
||||||
|
texty text text text text text text text text text text text {{this.props.type
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
// FIXME
|
||||||
|
================================================================================
|
||||||
|
`;
|
|
@ -0,0 +1 @@
|
||||||
|
run_spec(__dirname, ["glimmer"]);
|
|
@ -0,0 +1,145 @@
|
||||||
|
{{!-- Wrapping text --}}
|
||||||
|
<div>
|
||||||
|
Some text that would need to wrap on to a new line in order to display correctly and nicely
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- Wrapping tags --}}
|
||||||
|
<div>
|
||||||
|
<first>f</first> <first>f</first> <first>f</first> <first>f</first> <first>f</first> <first>f</first>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- Wrapping tags --}}
|
||||||
|
<div>
|
||||||
|
<first>f</first><first>f</first><first>f</first><first>f</first><first>f</first><first>f</first>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- Wrapping tags --}}
|
||||||
|
<div>
|
||||||
|
<first>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</first> <first>f</first>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
before<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at mollis lorem.</div>after
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
before{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}{stuff}{stuff}after{stuff}after
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
before {{stuff}} after {{stuff}} after {{stuff}} after {{stuff}} after {{stuff}} after {{stuff}} {{stuff}} {{stuff}} after {{stuff}} after
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
Please state your <b>name</b> and <b>occupation</b> for the board of <b>school</b> directors.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
First second third
|
||||||
|
<div attr="a very long string attribute that will overflow because it is very long">Something</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
First
|
||||||
|
</div>
|
||||||
|
Second
|
||||||
|
<div>
|
||||||
|
Third
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
First <div>
|
||||||
|
Second
|
||||||
|
</div> Third
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- leading whitespace --}}
|
||||||
|
<div> First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh Twelfth Thirteenth Fourteenth</div>
|
||||||
|
|
||||||
|
{{!-- trailing whitespace --}}
|
||||||
|
<div>First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh Twelfth Thirteenth Fourteenth </div>
|
||||||
|
|
||||||
|
{{!-- no leading or trailing whitespace --}}
|
||||||
|
<div>First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh Twelfth Thirteenth Fourteenth</div>
|
||||||
|
|
||||||
|
{{!-- translation leave text around tag --}}
|
||||||
|
<div>
|
||||||
|
<span>
|
||||||
|
First
|
||||||
|
</span>,
|
||||||
|
(<span>
|
||||||
|
Second
|
||||||
|
</span>)
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<span>
|
||||||
|
First second third fourth fifth sixth seventh
|
||||||
|
</span>,
|
||||||
|
(<span>
|
||||||
|
Second
|
||||||
|
</span>)
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- this really should split across lines --}}
|
||||||
|
<div>
|
||||||
|
before{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after{{stuff}}after
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- solitary whitespace --}}
|
||||||
|
<div first="first" second="second" third="third" fourth="fourth" fifth="fifth" sixth="sixth"> </div>
|
||||||
|
|
||||||
|
{{!-- whitespace on newline --}}
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
First
|
||||||
|
</div> <div>
|
||||||
|
Second
|
||||||
|
</div> <div>
|
||||||
|
Third
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- around multiline element --}}
|
||||||
|
<div>Before <div>{"Enough text to make this element wrap on to multiple lines when formatting"}</div> After</div>
|
||||||
|
|
||||||
|
{{!-- around multiline element second pass --}}
|
||||||
|
<div>
|
||||||
|
Before{" "}
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
"Enough text to make this element wrap on to multiple lines when formatting"
|
||||||
|
}
|
||||||
|
</div>{" "}
|
||||||
|
After
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- dont preserve blank lines when contains text --}}
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<div>Zeroth</div>
|
||||||
|
|
||||||
|
<div>First</div>
|
||||||
|
|
||||||
|
Second
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- multiple expressions --}}
|
||||||
|
<div>
|
||||||
|
{{header}}
|
||||||
|
{{body}}
|
||||||
|
{{footer}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- single expression child tags --}}
|
||||||
|
<div>
|
||||||
|
You currently have <strong>{{dashboardStr}}</strong> and <strong>{{userStr}}</strong>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{!-- expression does not break --}}
|
||||||
|
<div>texty text text text text text text text text text text text {{this.props.type}} </div>
|
||||||
|
|
||||||
|
// FIXME
|
|
@ -0,0 +1,509 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`basics.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 40
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
{{!-- after --}}
|
||||||
|
<span>
|
||||||
|
foo <span>bar</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
{{!-- before --}}
|
||||||
|
<span>
|
||||||
|
<span>bar</span> foo
|
||||||
|
</span>
|
||||||
|
|
||||||
|
{{!-- within --}}
|
||||||
|
<span>
|
||||||
|
foo <span> bar </span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
{{!-- break components --}}
|
||||||
|
<div>
|
||||||
|
<SuperSelect>
|
||||||
|
<p>foo<span>bar bar bar</span></p><h1><span><em>yep</em></span></h1>
|
||||||
|
</SuperSelect>
|
||||||
|
<h2>nope</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
hello <strong>hi</strong> <foo>sdkflsdfjk</foo>
|
||||||
|
</div>;
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
{{! after }}
|
||||||
|
<span>
|
||||||
|
foo<span>
|
||||||
|
bar
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
{{! before }}
|
||||||
|
<span>
|
||||||
|
<span>
|
||||||
|
bar
|
||||||
|
</span>
|
||||||
|
foo
|
||||||
|
</span>
|
||||||
|
{{! within }}
|
||||||
|
<span>
|
||||||
|
foo<span>
|
||||||
|
bar
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
{{! break components }}
|
||||||
|
<div>
|
||||||
|
<SuperSelect>
|
||||||
|
<p>
|
||||||
|
foo<span>
|
||||||
|
bar bar bar
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
<h1>
|
||||||
|
<span>
|
||||||
|
<em>
|
||||||
|
yep
|
||||||
|
</em>
|
||||||
|
</span>
|
||||||
|
</h1>
|
||||||
|
</SuperSelect>
|
||||||
|
<h2>
|
||||||
|
nope
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
hello<strong>
|
||||||
|
hi
|
||||||
|
</strong>
|
||||||
|
<foo>
|
||||||
|
sdkflsdfjk
|
||||||
|
</foo>
|
||||||
|
</div>
|
||||||
|
;
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`boss.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 40
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<p>Hi {{firstName}} {{lastName}} , welcome!</p>
|
||||||
|
{{#component propA}}
|
||||||
|
for {{propB}} do {{propC}} f
|
||||||
|
{{/component}}
|
||||||
|
{{#component propA}}
|
||||||
|
for {{propB}} <span>name</span>do {{propC}} f
|
||||||
|
{{/component}}
|
||||||
|
{{propA}} {{propB}}
|
||||||
|
{{propC}}{{propD}}
|
||||||
|
<span>{{propE}} {{propF}}</span>
|
||||||
|
<span>{{propG}}{{propH}}</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
hey
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<p>
|
||||||
|
Hi {{firstName}} {{lastName
|
||||||
|
}}, welcome!
|
||||||
|
</p>
|
||||||
|
{{#component propA}}
|
||||||
|
for{{propB}}do{{propC}}f
|
||||||
|
{{/component}}
|
||||||
|
{{#component propA}}
|
||||||
|
for
|
||||||
|
{{propB}}
|
||||||
|
<span>
|
||||||
|
name
|
||||||
|
</span>
|
||||||
|
do
|
||||||
|
{{propC}}
|
||||||
|
f
|
||||||
|
{{/component}}
|
||||||
|
{{propA}}
|
||||||
|
{{propB}}
|
||||||
|
{{propC}}
|
||||||
|
{{propD}}
|
||||||
|
<span>
|
||||||
|
{{propE}} {{propF}}
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
{{propG}}{{propH}}
|
||||||
|
</span>
|
||||||
|
hey
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`curly.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 40
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<p>Your username is @{{name}}</p>
|
||||||
|
<p>Hi {{firstName}} {{lastName}}</p>
|
||||||
|
=====================================output=====================================
|
||||||
|
<p>
|
||||||
|
Your username is @{{name}}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Hi {{firstName}} {{lastName}}
|
||||||
|
</p>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`display-inline-block.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 40
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<button>Click here! Click here! Click here! Click here! Click here! Click here!</button>
|
||||||
|
<button>
|
||||||
|
Click here! Click here! Click here! Click here! Click here! Click here!
|
||||||
|
</button>
|
||||||
|
<div>
|
||||||
|
<button>Click here! Click here! Click here! Click here! Click here! Click here!</button><button>Click here! Click here! Click here! Click here! Click here! Click here!</button>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<button>Click here! Click here! Click here! Click here! Click here! Click here!</button>
|
||||||
|
<button>Click here! Click here! Click here! Click here! Click here! Click here!</button>
|
||||||
|
</div>
|
||||||
|
<video src="brave.webm"></video>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<button>
|
||||||
|
Click here! Click here! Click here! Click here! Click here! Click here!
|
||||||
|
</button>
|
||||||
|
<button>
|
||||||
|
Click here! Click here! Click here! Click here! Click here! Click here!
|
||||||
|
</button>
|
||||||
|
<div>
|
||||||
|
<button>
|
||||||
|
Click here! Click here! Click here! Click here! Click here! Click here!
|
||||||
|
</button>
|
||||||
|
<button>
|
||||||
|
Click here! Click here! Click here! Click here! Click here! Click here!
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<button>
|
||||||
|
Click here! Click here! Click here! Click here! Click here! Click here!
|
||||||
|
</button>
|
||||||
|
<button>
|
||||||
|
Click here! Click here! Click here! Click here! Click here! Click here!
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<video src="brave.webm"></video>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`display-none.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 40
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
{{!-- TO FIX --}}
|
||||||
|
<HEAD><META CHARSET="utf-8" /><TITLE>My tITlE</TITLE><META NAME="description" content="My CoNtEnT" /></HEAD>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
{{! TO FIX }}
|
||||||
|
<HEAD>
|
||||||
|
<META CHARSET="utf-8" />
|
||||||
|
<TITLE>
|
||||||
|
My tITlE
|
||||||
|
</TITLE>
|
||||||
|
<META
|
||||||
|
NAME="description"
|
||||||
|
content="My CoNtEnT"
|
||||||
|
/>
|
||||||
|
</HEAD>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`fill.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 40
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<p>
|
||||||
|
<img
|
||||||
|
src="/images/pansies.jpg"
|
||||||
|
alt="about fedco bottom image"
|
||||||
|
style="float: left;"
|
||||||
|
/><strong>We are a cooperative</strong>, one of the few seed companies so organized
|
||||||
|
in the United States. Because we do not have an individual owner or beneficiary,
|
||||||
|
profit is not our primary goal. Consumers own 60% of the cooperative and worker
|
||||||
|
members 40%. Consumer and worker members share proportionately in the cooperative’s
|
||||||
|
profits through our annual patronage dividends.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<p>
|
||||||
|
<img
|
||||||
|
src="/images/pansies.jpg"
|
||||||
|
alt="about fedco bottom image"
|
||||||
|
style="float: left;"
|
||||||
|
/>
|
||||||
|
<strong>
|
||||||
|
We are a cooperative
|
||||||
|
</strong>
|
||||||
|
, one of the few seed companies so organized
|
||||||
|
in the United States. Because we do not have an individual owner or beneficiary,
|
||||||
|
profit is not our primary goal. Consumers own 60% of the cooperative and worker
|
||||||
|
members 40%. Consumer and worker members share proportionately in the cooperative’s
|
||||||
|
profits through our annual patronage dividends.
|
||||||
|
</p>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`inline-element.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 40
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
{{!-- TO FIX --}}
|
||||||
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus massa vel augue
|
||||||
|
vestibulum facilisis in porta turpis. Ut faucibus lectus sit amet urna consectetur dignissim.
|
||||||
|
Sam vitae neque quis ex dapibus faucibus at sed ligula. Nulla sit amet aliquet nibh.
|
||||||
|
Vestibulum at congue mi. Suspendisse vitae odio vitae massa hendrerit mattis sed eget dui.
|
||||||
|
Sed eu scelerisque neque. Donec <b>maximus</b> rhoncus pellentesque. Aenean purus turpis, vehicula
|
||||||
|
euismod ante vel, ultricies eleifend dui. Class aptent taciti sociosqu ad litora torquent per
|
||||||
|
conubia nostra, per inceptos himenaeos. Donec in ornare velit.</p>
|
||||||
|
|
||||||
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus massa vel augue
|
||||||
|
vestibulum facilisis in porta turpis. Ut faucibus lectus sit amet urna consectetur dignissim.
|
||||||
|
Sam vitae neque quis ex dapibus faucibus at sed ligula. Nulla sit amet aliquet nibh.
|
||||||
|
Vestibulum at congue mi. Suspendisse vitae odio vitae massa hendrerit mattis sed eget dui.
|
||||||
|
Sed eu scelerisque neque. Donec <a href="#"><b>maximus</b></a> rhoncus pellentesque. Aenean purus turpis, vehicula
|
||||||
|
euismod ante vel, ultricies eleifend dui. Class aptent taciti sociosqu ad litora torquent per
|
||||||
|
conubia nostra, per inceptos himenaeos. Donec in ornare velit.</p>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
{{! TO FIX }}
|
||||||
|
<p>
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus massa vel augue
|
||||||
|
vestibulum facilisis in porta turpis. Ut faucibus lectus sit amet urna consectetur dignissim.
|
||||||
|
Sam vitae neque quis ex dapibus faucibus at sed ligula. Nulla sit amet aliquet nibh.
|
||||||
|
Vestibulum at congue mi. Suspendisse vitae odio vitae massa hendrerit mattis sed eget dui.
|
||||||
|
Sed eu scelerisque neque. Donec<b
|
||||||
|
>
|
||||||
|
maximus
|
||||||
|
</b>
|
||||||
|
rhoncus pellentesque. Aenean purus turpis, vehicula
|
||||||
|
euismod ante vel, ultricies eleifend dui. Class aptent taciti sociosqu ad litora torquent per
|
||||||
|
conubia nostra, per inceptos himenaeos. Donec in ornare velit.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus massa vel augue
|
||||||
|
vestibulum facilisis in porta turpis. Ut faucibus lectus sit amet urna consectetur dignissim.
|
||||||
|
Sam vitae neque quis ex dapibus faucibus at sed ligula. Nulla sit amet aliquet nibh.
|
||||||
|
Vestibulum at congue mi. Suspendisse vitae odio vitae massa hendrerit mattis sed eget dui.
|
||||||
|
Sed eu scelerisque neque. Donec<a
|
||||||
|
href="#"
|
||||||
|
>
|
||||||
|
<b>
|
||||||
|
maximus
|
||||||
|
</b>
|
||||||
|
</a>
|
||||||
|
rhoncus pellentesque. Aenean purus turpis, vehicula
|
||||||
|
euismod ante vel, ultricies eleifend dui. Class aptent taciti sociosqu ad litora torquent per
|
||||||
|
conubia nostra, per inceptos himenaeos. Donec in ornare velit.
|
||||||
|
</p>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`non-breaking-whitespace.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 40
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<!-- normal whitespaces -->
|
||||||
|
<span>Nihil aut odit omnis. Quam maxime est molestiae. Maxime dolorem dolores voluptas quaerat ut qui sunt vitae error.</span>
|
||||||
|
<!-- non-breaking whitespaces -->
|
||||||
|
<span>Nihil aut odit omnis. Quam maxime est molestiae. Maxime dolorem dolores voluptas quaerat ut qui sunt vitae error.</span>
|
||||||
|
<!-- non-breaking narrow whitespaces -->
|
||||||
|
<span>Prix : 32 €</span>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<!-- normal whitespaces -->
|
||||||
|
<span>
|
||||||
|
Nihil aut odit omnis. Quam maxime est molestiae. Maxime dolorem dolores voluptas quaerat ut qui sunt vitae error.
|
||||||
|
</span>
|
||||||
|
<!-- non-breaking whitespaces -->
|
||||||
|
<span>
|
||||||
|
Nihil aut odit omnis. Quam maxime est molestiae. Maxime dolorem dolores voluptas quaerat ut qui sunt vitae error.
|
||||||
|
</span>
|
||||||
|
<!-- non-breaking narrow whitespaces -->
|
||||||
|
<span>
|
||||||
|
Prix : 32 €
|
||||||
|
</span>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`punctuation.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 40
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<span>This is your name: {{name}}.</span>
|
||||||
|
<span>This is your name: {{name}} (employee)</span>
|
||||||
|
<span>This is your name: {{name}} ({{role}})</span>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<span>
|
||||||
|
This is your name: {{name}}.
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
This is your name: {{name}}(employee)
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
This is your name: {{name}}({{role}})
|
||||||
|
</span>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`surrounding-linebreak.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 40
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<span>123</span>
|
||||||
|
<span>
|
||||||
|
123</span>
|
||||||
|
<span>123
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
123
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<div>123</div>
|
||||||
|
<div>
|
||||||
|
123</div>
|
||||||
|
<div>123
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
123
|
||||||
|
</div>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<span>
|
||||||
|
123
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
123
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
123
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
123
|
||||||
|
</span>
|
||||||
|
<div>
|
||||||
|
123
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
123
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
123
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
123
|
||||||
|
</div>
|
||||||
|
================================================================================
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`table.hbs 1`] = `
|
||||||
|
====================================options=====================================
|
||||||
|
parsers: ["glimmer"]
|
||||||
|
printWidth: 40
|
||||||
|
| printWidth
|
||||||
|
=====================================input======================================
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>A</th>
|
||||||
|
<th>B</th>
|
||||||
|
<th>C</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<table><thead><tr><th>A</th><th>B</th><th>C</th></tr></thead></table>
|
||||||
|
|
||||||
|
<table> <thead> <tr> <th> A </th> <th> B </th> <th> C </th> </tr> </thead> </table>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
=====================================output=====================================
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
A
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
B
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
C
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
A
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
B
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
C
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
A
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
B
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
C
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
================================================================================
|
||||||
|
`;
|
|
@ -0,0 +1,26 @@
|
||||||
|
{{!-- after --}}
|
||||||
|
<span>
|
||||||
|
foo <span>bar</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
{{!-- before --}}
|
||||||
|
<span>
|
||||||
|
<span>bar</span> foo
|
||||||
|
</span>
|
||||||
|
|
||||||
|
{{!-- within --}}
|
||||||
|
<span>
|
||||||
|
foo <span> bar </span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
{{!-- break components --}}
|
||||||
|
<div>
|
||||||
|
<SuperSelect>
|
||||||
|
<p>foo<span>bar bar bar</span></p><h1><span><em>yep</em></span></h1>
|
||||||
|
</SuperSelect>
|
||||||
|
<h2>nope</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
hello <strong>hi</strong> <foo>sdkflsdfjk</foo>
|
||||||
|
</div>;
|
|
@ -0,0 +1,15 @@
|
||||||
|
<p>Hi {{firstName}} {{lastName}} , welcome!</p>
|
||||||
|
{{#component propA}}
|
||||||
|
for {{propB}} do {{propC}} f
|
||||||
|
{{/component}}
|
||||||
|
{{#component propA}}
|
||||||
|
for {{propB}} <span>name</span>do {{propC}} f
|
||||||
|
{{/component}}
|
||||||
|
{{propA}} {{propB}}
|
||||||
|
{{propC}}{{propD}}
|
||||||
|
<span>{{propE}} {{propF}}</span>
|
||||||
|
<span>{{propG}}{{propH}}</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
hey
|
|
@ -0,0 +1,12 @@
|
||||||
|
<button>Click here! Click here! Click here! Click here! Click here! Click here!</button>
|
||||||
|
<button>
|
||||||
|
Click here! Click here! Click here! Click here! Click here! Click here!
|
||||||
|
</button>
|
||||||
|
<div>
|
||||||
|
<button>Click here! Click here! Click here! Click here! Click here! Click here!</button><button>Click here! Click here! Click here! Click here! Click here! Click here!</button>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<button>Click here! Click here! Click here! Click here! Click here! Click here!</button>
|
||||||
|
<button>Click here! Click here! Click here! Click here! Click here! Click here!</button>
|
||||||
|
</div>
|
||||||
|
<video src="brave.webm"></video>
|
|
@ -0,0 +1,2 @@
|
||||||
|
{{!-- TO FIX --}}
|
||||||
|
<HEAD><META CHARSET="utf-8" /><TITLE>My tITlE</TITLE><META NAME="description" content="My CoNtEnT" /></HEAD>
|
|
@ -0,0 +1,11 @@
|
||||||
|
<p>
|
||||||
|
<img
|
||||||
|
src="/images/pansies.jpg"
|
||||||
|
alt="about fedco bottom image"
|
||||||
|
style="float: left;"
|
||||||
|
/><strong>We are a cooperative</strong>, one of the few seed companies so organized
|
||||||
|
in the United States. Because we do not have an individual owner or beneficiary,
|
||||||
|
profit is not our primary goal. Consumers own 60% of the cooperative and worker
|
||||||
|
members 40%. Consumer and worker members share proportionately in the cooperative’s
|
||||||
|
profits through our annual patronage dividends.
|
||||||
|
</p>
|
|
@ -0,0 +1,16 @@
|
||||||
|
{{!-- TO FIX --}}
|
||||||
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus massa vel augue
|
||||||
|
vestibulum facilisis in porta turpis. Ut faucibus lectus sit amet urna consectetur dignissim.
|
||||||
|
Sam vitae neque quis ex dapibus faucibus at sed ligula. Nulla sit amet aliquet nibh.
|
||||||
|
Vestibulum at congue mi. Suspendisse vitae odio vitae massa hendrerit mattis sed eget dui.
|
||||||
|
Sed eu scelerisque neque. Donec <b>maximus</b> rhoncus pellentesque. Aenean purus turpis, vehicula
|
||||||
|
euismod ante vel, ultricies eleifend dui. Class aptent taciti sociosqu ad litora torquent per
|
||||||
|
conubia nostra, per inceptos himenaeos. Donec in ornare velit.</p>
|
||||||
|
|
||||||
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus massa vel augue
|
||||||
|
vestibulum facilisis in porta turpis. Ut faucibus lectus sit amet urna consectetur dignissim.
|
||||||
|
Sam vitae neque quis ex dapibus faucibus at sed ligula. Nulla sit amet aliquet nibh.
|
||||||
|
Vestibulum at congue mi. Suspendisse vitae odio vitae massa hendrerit mattis sed eget dui.
|
||||||
|
Sed eu scelerisque neque. Donec <a href="#"><b>maximus</b></a> rhoncus pellentesque. Aenean purus turpis, vehicula
|
||||||
|
euismod ante vel, ultricies eleifend dui. Class aptent taciti sociosqu ad litora torquent per
|
||||||
|
conubia nostra, per inceptos himenaeos. Donec in ornare velit.</p>
|
|
@ -0,0 +1 @@
|
||||||
|
run_spec(__dirname, ["glimmer"], { printWidth: 40 });
|
|
@ -0,0 +1,6 @@
|
||||||
|
<!-- normal whitespaces -->
|
||||||
|
<span>Nihil aut odit omnis. Quam maxime est molestiae. Maxime dolorem dolores voluptas quaerat ut qui sunt vitae error.</span>
|
||||||
|
<!-- non-breaking whitespaces -->
|
||||||
|
<span>Nihil aut odit omnis. Quam maxime est molestiae. Maxime dolorem dolores voluptas quaerat ut qui sunt vitae error.</span>
|
||||||
|
<!-- non-breaking narrow whitespaces -->
|
||||||
|
<span>Prix : 32 €</span>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<span>This is your name: {{name}}.</span>
|
||||||
|
<span>This is your name: {{name}} (employee)</span>
|
||||||
|
<span>This is your name: {{name}} ({{role}})</span>
|
|
@ -0,0 +1,17 @@
|
||||||
|
<span>123</span>
|
||||||
|
<span>
|
||||||
|
123</span>
|
||||||
|
<span>123
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
123
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<div>123</div>
|
||||||
|
<div>
|
||||||
|
123</div>
|
||||||
|
<div>123
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
123
|
||||||
|
</div>
|
|
@ -0,0 +1,20 @@
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>A</th>
|
||||||
|
<th>B</th>
|
||||||
|
<th>C</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<table><thead><tr><th>A</th><th>B</th><th>C</th></tr></thead></table>
|
||||||
|
|
||||||
|
<table> <thead> <tr> <th> A </th> <th> B </th> <th> C </th> </tr> </thead> </table>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
|
@ -1,210 +0,0 @@
|
||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
||||||
|
|
||||||
exports[`basic-handlebars.hbs 1`] = `
|
|
||||||
====================================options=====================================
|
|
||||||
parsers: ["glimmer"]
|
|
||||||
printWidth: 80
|
|
||||||
| printWidth
|
|
||||||
=====================================input======================================
|
|
||||||
<script id="entry-template" type="text/x-handlebars-template">
|
|
||||||
<div class="entry">
|
|
||||||
<h1>{{title}}</h1>
|
|
||||||
<div class="body">
|
|
||||||
{{body}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div class="{{hello}} {{world}}"></div>
|
|
||||||
|
|
||||||
=====================================output=====================================
|
|
||||||
<script id="entry-template" type="text/x-handlebars-template">
|
|
||||||
<div class="entry">
|
|
||||||
<h1>
|
|
||||||
{{title}}
|
|
||||||
</h1>
|
|
||||||
<div class="body">
|
|
||||||
{{body}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</script>
|
|
||||||
<div class="{{hello}} {{world}}"></div>
|
|
||||||
================================================================================
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports[`comments.hbs 1`] = `
|
|
||||||
====================================options=====================================
|
|
||||||
parsers: ["glimmer"]
|
|
||||||
printWidth: 80
|
|
||||||
| printWidth
|
|
||||||
=====================================input======================================
|
|
||||||
<div class="entry">
|
|
||||||
{{! This comment will not be in the output }}
|
|
||||||
{{!-- This comment as }} and will not be in the output --}}
|
|
||||||
<!-- This comment will be in the output -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
=====================================output=====================================
|
|
||||||
<div class="entry">
|
|
||||||
{{! This comment will not be in the output }}
|
|
||||||
{{!-- This comment as }} and will not be in the output --}}
|
|
||||||
<!-- This comment will be in the output -->
|
|
||||||
</div>
|
|
||||||
================================================================================
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports[`component.hbs 1`] = `
|
|
||||||
====================================options=====================================
|
|
||||||
parsers: ["glimmer"]
|
|
||||||
printWidth: 80
|
|
||||||
| printWidth
|
|
||||||
=====================================input======================================
|
|
||||||
{{my-component foo="bar" bar="baz" action=(action "almostTheMaximumLengthxxxxxx")}}
|
|
||||||
|
|
||||||
{{my-component foo="bar"}}
|
|
||||||
|
|
||||||
=====================================output=====================================
|
|
||||||
{{my-component
|
|
||||||
foo="bar"
|
|
||||||
bar="baz"
|
|
||||||
action=(action "almostTheMaximumLengthxxxxxx")
|
|
||||||
}}
|
|
||||||
{{my-component foo="bar"}}
|
|
||||||
================================================================================
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports[`each.hbs 1`] = `
|
|
||||||
====================================options=====================================
|
|
||||||
parsers: ["glimmer"]
|
|
||||||
printWidth: 80
|
|
||||||
| printWidth
|
|
||||||
=====================================input======================================
|
|
||||||
<div id="comments">
|
|
||||||
{{#each comments}}
|
|
||||||
<h2><a href="/posts/{{permalink}}#{{id}}">{{title}}</a></h2>
|
|
||||||
<div>{{body}}</div>
|
|
||||||
{{/each}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
=====================================output=====================================
|
|
||||||
<div id="comments">
|
|
||||||
{{#each comments}}
|
|
||||||
<h2>
|
|
||||||
<a href="/posts/{{permalink}}#{{id}}">
|
|
||||||
{{title}}
|
|
||||||
</a>
|
|
||||||
</h2>
|
|
||||||
<div>
|
|
||||||
{{body}}
|
|
||||||
</div>
|
|
||||||
{{/each}}
|
|
||||||
</div>
|
|
||||||
================================================================================
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports[`if.hbs 1`] = `
|
|
||||||
====================================options=====================================
|
|
||||||
parsers: ["glimmer"]
|
|
||||||
printWidth: 80
|
|
||||||
| printWidth
|
|
||||||
=====================================input======================================
|
|
||||||
{{#if title}}
|
|
||||||
{{permalink}}
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
=====================================output=====================================
|
|
||||||
{{#if title}}
|
|
||||||
{{permalink}}
|
|
||||||
{{/if}}
|
|
||||||
================================================================================
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports[`if-else.hbs 1`] = `
|
|
||||||
====================================options=====================================
|
|
||||||
parsers: ["glimmer"]
|
|
||||||
printWidth: 80
|
|
||||||
| printWidth
|
|
||||||
=====================================input======================================
|
|
||||||
<h1>
|
|
||||||
{{#if isAtWork}}
|
|
||||||
Ship that code!
|
|
||||||
{{else if isReading}}
|
|
||||||
You can finish War and Peace eventually...
|
|
||||||
{{else}}
|
|
||||||
Go to bed!
|
|
||||||
{{/if}}
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<h2>
|
|
||||||
{{#if a}}
|
|
||||||
A
|
|
||||||
{{else}}
|
|
||||||
B
|
|
||||||
{{/if}}
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
|
|
||||||
=====================================output=====================================
|
|
||||||
<h1>
|
|
||||||
{{#if isAtWork}}
|
|
||||||
Ship that code!
|
|
||||||
{{else if isReading}}
|
|
||||||
You can finish War and Peace eventually...
|
|
||||||
{{else}}
|
|
||||||
Go to bed!
|
|
||||||
{{/if}}
|
|
||||||
</h1>
|
|
||||||
<h2>
|
|
||||||
{{#if a}}
|
|
||||||
A
|
|
||||||
{{else}}
|
|
||||||
B
|
|
||||||
{{/if}}
|
|
||||||
</h2>
|
|
||||||
================================================================================
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports[`nested-path.hbs 1`] = `
|
|
||||||
====================================options=====================================
|
|
||||||
parsers: ["glimmer"]
|
|
||||||
printWidth: 80
|
|
||||||
| printWidth
|
|
||||||
=====================================input======================================
|
|
||||||
<div class="entry">
|
|
||||||
<h1>{{title}}</h1>
|
|
||||||
<h2>By {{author.name}}</h2>
|
|
||||||
|
|
||||||
<div class="body">
|
|
||||||
{{body}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
=====================================output=====================================
|
|
||||||
<div class="entry">
|
|
||||||
<h1>
|
|
||||||
{{title}}
|
|
||||||
</h1>
|
|
||||||
<h2>
|
|
||||||
By {{author.name}}
|
|
||||||
</h2>
|
|
||||||
<div class="body">
|
|
||||||
{{body}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
================================================================================
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports[`raw.hbs 1`] = `
|
|
||||||
====================================options=====================================
|
|
||||||
parsers: ["glimmer"]
|
|
||||||
printWidth: 80
|
|
||||||
| printWidth
|
|
||||||
=====================================input======================================
|
|
||||||
<p>{{{raw}}}</p>
|
|
||||||
|
|
||||||
=====================================output=====================================
|
|
||||||
<p>
|
|
||||||
{{{raw}}}
|
|
||||||
</p>
|
|
||||||
================================================================================
|
|
||||||
`;
|
|
|
@ -1,3 +0,0 @@
|
||||||
{{my-component foo="bar" bar="baz" action=(action "almostTheMaximumLengthxxxxxx")}}
|
|
||||||
|
|
||||||
{{my-component foo="bar"}}
|
|
|
@ -1,18 +0,0 @@
|
||||||
<h1>
|
|
||||||
{{#if isAtWork}}
|
|
||||||
Ship that code!
|
|
||||||
{{else if isReading}}
|
|
||||||
You can finish War and Peace eventually...
|
|
||||||
{{else}}
|
|
||||||
Go to bed!
|
|
||||||
{{/if}}
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<h2>
|
|
||||||
{{#if a}}
|
|
||||||
A
|
|
||||||
{{else}}
|
|
||||||
B
|
|
||||||
{{/if}}
|
|
||||||
</h2>
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
{{#if title}}
|
|
||||||
{{permalink}}
|
|
||||||
{{/if}}
|
|
Loading…
Reference in New Issue