Skip to content

Commit

Permalink
update snapshot tests
Browse files Browse the repository at this point in the history
  • Loading branch information
g-plane committed Apr 16, 2024
1 parent b1e36e5 commit 3d17975
Show file tree
Hide file tree
Showing 71 changed files with 450 additions and 356 deletions.
2 changes: 1 addition & 1 deletion markup_fmt/tests/fmt/html/attributes/class-names.snap
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ source: markup_fmt/tests/fmt.rs
height="58px"
width="205px"
alt="Yahoo"
/></a>
></a>
</h1>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions markup_fmt/tests/fmt/html/attributes/srcset.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ source: markup_fmt/tests/fmt.rs
srcset="/assets/[email protected] 400w, /assets/visual.png 805w"
sizes="(max-width: 66rem) 100vw, 66rem"
alt=""
/>
>
<img
src="/assets/visual.png"
srcset="/assets/[email protected] 400w, /assets/visual.png 805w, /assets/[email protected] 1610w, /assets/[email protected] 2415w"
sizes="(max-width: 66rem) 100vw, 66rem"
alt=""
/>
>
<img
src="/assets/visual.png"
srcset="/assets/[email protected] 0.5x, /assets/visual.png 1111x, /assets/[email protected] 2x, /assets/[email protected] 3.3333x"
sizes="(max-width: 66rem) 100vw, 66rem"
alt=""
/>
>
<img srcset="
/media/examples/surfer-240-200.jpg
">
Expand Down
6 changes: 3 additions & 3 deletions markup_fmt/tests/fmt/html/basics/html5-boilerplate.snap
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ source: markup_fmt/tests/fmt.rs
crossorigin="anonymous"
></script>
<script>
window.jQuery || document.write('<script src="js/vendor/jquery-3.3.1.min.js"><\/script>')
window.jQuery || document.write('<script src="js/vendor/jquery-3.3.1.min.js"><\/script>')
</script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>

<!-- Google Analytics: change UA-XXXXX-Y to be your site's ID. -->
<script>
window.ga = function () { ga.q.push(arguments) }; ga.q = []; ga.l = +new Date;
ga('create', 'UA-XXXXX-Y', 'auto'); ga('send', 'pageview')
window.ga = function () { ga.q.push(arguments) }; ga.q = []; ga.l = +new Date;
ga('create', 'UA-XXXXX-Y', 'auto'); ga('send', 'pageview')
</script>
<script
src="https://www.google-analytics.com/analytics.js"
Expand Down
20 changes: 10 additions & 10 deletions markup_fmt/tests/fmt/html/basics/with-colon.snap
Original file line number Diff line number Diff line change
Expand Up @@ -213,42 +213,42 @@ e-wrap </html:textarea>
</h1>
</div>
<script>
const func = function() { console.log('Hello, there');}
const func = function() { console.log('Hello, there');}
</script>
</with:colon>

<!-- script like -->
<with:colon>
<style>
.a{color:#f00}
.a{color:#f00}
</style>
<script>
const func = function() { console.log('Hello, there');}
const func = function() { console.log('Hello, there');}
</script>
<style>
.A{COLOR:#F00}
.A{COLOR:#F00}
</style>
<html:script>
const func = function() { console.log('Hello, there');}
const func = function() { console.log('Hello, there');}
</html:script>
<html:style>
.a{color:#f00}
.a{color:#f00}
</html:style>
<svg>
<style>
.a{color:#f00}
.a{color:#f00}
</style>
</svg>
<svg>
<style>
.a{color:#f00}
.a{color:#f00}
</style>
</svg>
</with:colon>
<html:script>
const func = function() { console.log('Hello, there');}
const func = function() { console.log('Hello, there');}
</html:script>
<html:style>
.a{color:#f00}
.a{color:#f00}
</html:style>

Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ source: markup_fmt/tests/fmt.rs
<script
long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"
>
alert(1)
alert(1)
</script>
<style
long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"
>
.a{color: #f00}
.a{color: #f00}
</style>
<script>
alert(1)
alert(1)
</script>
<style>
.a{color: #f00}
.a{color: #f00}
</style>

Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ source: markup_fmt/tests/fmt.rs
---
<script
long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value">
alert(1)
alert(1)
</script>
<style
long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value">
.a{color: #f00}
.a{color: #f00}
</style>
<script>
alert(1)
alert(1)
</script>
<style>
.a{color: #f00}
.a{color: #f00}
</style>

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ source: markup_fmt/tests/fmt.rs
<img
long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"
src="./1.jpg"
/>
<img src="./1.jpg" /><img src="./1.jpg" /><img src="./1.jpg" /><img
>
<img src="./1.jpg"><img src="./1.jpg"><img src="./1.jpg"><img src="./1.jpg"><img
src="./1.jpg"
/><img src="./1.jpg" />
>

Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ source: markup_fmt/tests/fmt.rs
---
<img
long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"
src="./1.jpg"
/>
<img src="./1.jpg" /><img src="./1.jpg" /><img src="./1.jpg" /><img
src="./1.jpg"
/><img src="./1.jpg" />
src="./1.jpg">
<img src="./1.jpg"><img src="./1.jpg"><img src="./1.jpg"><img src="./1.jpg"><img
src="./1.jpg">

4 changes: 2 additions & 2 deletions markup_fmt/tests/fmt/html/case/case.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ source: markup_fmt/tests/fmt.rs
<body>
<p>Hello world!<br> This is HTML5 Boilerplate.</p>
<script>
window.ga = function () { ga.q.push(arguments) }; ga.q = []; ga.l = +new Date;
ga('create', 'UA-XXXXX-Y', 'auto'); ga('send', 'pageview')
window.ga = function () { ga.q.push(arguments) }; ga.q = []; ga.l = +new Date;
ga('create', 'UA-XXXXX-Y', 'auto'); ga('send', 'pageview')
</script>
<script
src="https://www.google-analytics.com/analytics.js"
Expand Down
6 changes: 3 additions & 3 deletions markup_fmt/tests/fmt/html/max-attrs-per-line/attrs.one.snap
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ source: markup_fmt/tests/fmt.rs
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
</div>

<img src="/images/foo.png" />
<img src="/images/foo.png">

<img
src="/images/foo.png"
alt="bar"
/>
>

<img
src="/images/foo.png"
alt="Lorem ipsum dolor sit amet, consectetur adipiscing elit."
/>
>

6 changes: 3 additions & 3 deletions markup_fmt/tests/fmt/html/max-attrs-per-line/attrs.two.snap
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ source: markup_fmt/tests/fmt.rs
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
</div>

<img src="/images/foo.png" />
<img src="/images/foo.png">

<img src="/images/foo.png" alt="bar" />
<img src="/images/foo.png" alt="bar">

<img
src="/images/foo.png"
alt="Lorem ipsum dolor sit amet, consectetur adipiscing elit."
/>
>

18 changes: 13 additions & 5 deletions markup_fmt/tests/fmt/html/script-style-indent/config.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
[script]
[default]

[script-enabled]
scriptIndent = true

[style]
[script-disabled]
scriptIndent = false

[style-enabled]
styleIndent = true

[style-disabled]
styleIndent = false

[override-script]
scriptIndent = false
"html.scriptIndent" = true
Expand All @@ -12,6 +20,6 @@ scriptIndent = false
styleIndent = false
"html.styleIndent" = true

[both]
scriptIndent = true
styleIndent = true
[both-disabled]
scriptIndent = false
styleIndent = false
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
source: markup_fmt/tests/fmt.rs
---
<!DOCTYPE html>
<html lang="en">
<body>
<style>
a { text-decoration: none; }
</style>
<script>
window.addEventListener('load', () => {})
</script>
</body>
</html>

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source: markup_fmt/tests/fmt.rs
<html lang="en">
<body>
<style>
a { text-decoration: none; }
a { text-decoration: none; }
</style>
<script>
window.addEventListener('load', () => {})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ source: markup_fmt/tests/fmt.rs
a { text-decoration: none; }
</style>
<script>
window.addEventListener('load', () => {})
window.addEventListener('load', () => {})
</script>
</body>
</html>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
source: markup_fmt/tests/fmt.rs
---
<!DOCTYPE html>
<html lang="en">
<body>
<style>
a { text-decoration: none; }
</style>
<script>
window.addEventListener('load', () => {})
</script>
</body>
</html>

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
source: markup_fmt/tests/fmt.rs
---
<!DOCTYPE html>
<html lang="en">
<body>
<style>
a { text-decoration: none; }
</style>
<script>
window.addEventListener('load', () => {})
</script>
</body>
</html>

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source: markup_fmt/tests/fmt.rs
<div />

<input>
<input />
<input>

<circle></circle>
<circle />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source: markup_fmt/tests/fmt.rs
<div></div>

<input>
<input />
<input>

<circle></circle>
<circle />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source: markup_fmt/tests/fmt.rs
<div />

<input>
<input />
<input>

<circle></circle>
<circle />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source: markup_fmt/tests/fmt.rs
<div />

<input>
<input />
<input>

<circle></circle>
<circle />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source: markup_fmt/tests/fmt.rs
<div />

<input>
<input />
<input>

<circle></circle>
<circle />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source: markup_fmt/tests/fmt.rs
<div />

<input>
<input />
<input>

<circle></circle>
<circle></circle>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source: markup_fmt/tests/fmt.rs
<div />

<input>
<input />
<input>

<circle />
<circle />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source: markup_fmt/tests/fmt.rs
<div />

<input>
<input />
<input>

<circle></circle>
<circle />
Expand Down
Loading

0 comments on commit 3d17975

Please sign in to comment.