From 9266e3e85b0dd4c594554cf9a91988e20c006f9b Mon Sep 17 00:00:00 2001 From: Seiya <20365512+seiyab@users.noreply.github.com> Date: Sat, 29 Nov 2025 16:11:52 +0900 Subject: [PATCH] Add resolved test cases (#18358) Co-authored-by: fisker Cheung --- .../atrule/__snapshots__/format.test.js.snap | 22 ++++++ tests/format/css/atrule/supports.css | 10 +++ .../__snapshots__/format.test.js.snap | 77 +++++++++++++++++++ tests/format/css/fill-value/fill.css | 33 ++++++++ .../__snapshots__/format.test.js.snap | 18 +++++ .../format/jsx/template/styled-components.js | 9 +++ .../ignore-emoji/ignored/α.js | 4 + 7 files changed, 173 insertions(+) create mode 100644 tests/integration/cli/special-characters-in-path/ignore-emoji/ignored/α.js diff --git a/tests/format/css/atrule/__snapshots__/format.test.js.snap b/tests/format/css/atrule/__snapshots__/format.test.js.snap index 7c717da30..22e23642e 100644 --- a/tests/format/css/atrule/__snapshots__/format.test.js.snap +++ b/tests/format/css/atrule/__snapshots__/format.test.js.snap @@ -4296,6 +4296,16 @@ B @supports (transform-style: preserve-3d) or ((-moz-transform-style: preserve-3d) or ((-o-transform-style: preserve-3d) or (-webkit-transform-style: preserve-3d))) {} +/* #8201 */ +@supports (--element(".minwidth", {"minWidth": 300})) { + [--self] { + background: greenyellow; + } +} +@supports ({"example": 1}) { + * { background: red; } +} + =====================================output===================================== @supports (transform-origin: 5% 5%) { } @@ -4573,6 +4583,18 @@ B ) { } +/* #8201 */ +@supports (--element(".minwidth", {"minWidth": 300})) { + [--self] { + background: greenyellow; + } +} +@supports ({"example": 1}) { + * { + background: red; + } +} + ================================================================================ `; diff --git a/tests/format/css/atrule/supports.css b/tests/format/css/atrule/supports.css index d0c6b91ff..f6e9403f8 100644 --- a/tests/format/css/atrule/supports.css +++ b/tests/format/css/atrule/supports.css @@ -381,3 +381,13 @@ B @supports (transform-style: preserve-3d) or ((-moz-transform-style: preserve-3d) or ((-o-transform-style: preserve-3d) or (-webkit-transform-style: preserve-3d))) {} + +/* #8201 */ +@supports (--element(".minwidth", {"minWidth": 300})) { + [--self] { + background: greenyellow; + } +} +@supports ({"example": 1}) { + * { background: red; } +} diff --git a/tests/format/css/fill-value/__snapshots__/format.test.js.snap b/tests/format/css/fill-value/__snapshots__/format.test.js.snap index 214f161a9..177049b63 100644 --- a/tests/format/css/fill-value/__snapshots__/format.test.js.snap +++ b/tests/format/css/fill-value/__snapshots__/format.test.js.snap @@ -11,6 +11,39 @@ div { $fontFamily: "Lato", -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif; } +/* #4460 */ +.SearchBox { + box-shadow: 0 1rem 6rem rgba(0, 0, 0, 0.18), 0 0.3rem 1rem rgba(0, 0, 0, 0.17); +} + +.SearchBox { + @include foo { + margin-left: sg-layout-width(logo-shopify) / 2 * -1 + sg-offset-x(page-nav) / 2; + } +} + +.SearchBox { + box-shadow: 0 1rem 6rem rgba(0, 0, 0, 0.18), 0 0.3rem 1rem rgba(0, 0, 0, 0.17) !important; +} + +.demo { + background-position: 0 0, 0 spacing(tight), spacing(tight) -1 * spacing(tight), -1 * spacing(tight) 0; +} + +/* #4604 */ +.this-will-not-wrap { + background: transparent url(/long/path/to/dummy-image.svg) -1000px center no-repeat; +} + +.this-will-wrap-correctly { + background: transparent url(/long/path/to/dummy-image.svg) 1000px center no-repeat; +} + +.this-will-also-wrap-but-incorrectly { + background: transparent url(/even/longer/path/to/dummy-image.svg) -1000px center no-repeat; +} + + =====================================output===================================== div { border-left: 1px solid @@ -24,5 +57,49 @@ div { sans-serif; } +/* #4460 */ +.SearchBox { + box-shadow: + 0 1rem 6rem rgba(0, 0, 0, 0.18), + 0 0.3rem 1rem rgba(0, 0, 0, 0.17); +} + +.SearchBox { + @include foo { + margin-left: sg-layout-width(logo-shopify) / 2 * -1 + + sg-offset-x(page-nav) / 2; + } +} + +.SearchBox { + box-shadow: + 0 1rem 6rem rgba(0, 0, 0, 0.18), + 0 0.3rem 1rem rgba(0, 0, 0, 0.17) !important; +} + +.demo { + background-position: + 0 0, + 0 spacing(tight), + spacing(tight) -1 * spacing(tight), + -1 * spacing(tight) 0; +} + +/* #4604 */ +.this-will-not-wrap { + background: transparent url(/long/path/to/dummy-image.svg) -1000px center + no-repeat; +} + +.this-will-wrap-correctly { + background: transparent url(/long/path/to/dummy-image.svg) 1000px center + no-repeat; +} + +.this-will-also-wrap-but-incorrectly { + background: transparent url(/even/longer/path/to/dummy-image.svg) -1000px + center no-repeat; +} + ================================================================================ `; diff --git a/tests/format/css/fill-value/fill.css b/tests/format/css/fill-value/fill.css index 0a9f76dca..304ab2cda 100644 --- a/tests/format/css/fill-value/fill.css +++ b/tests/format/css/fill-value/fill.css @@ -2,3 +2,36 @@ div { border-left: 1px solid mix($warningBackgroundColors, $warningBorderColors, 50%); $fontFamily: "Lato", -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif; } + +/* #4460 */ +.SearchBox { + box-shadow: 0 1rem 6rem rgba(0, 0, 0, 0.18), 0 0.3rem 1rem rgba(0, 0, 0, 0.17); +} + +.SearchBox { + @include foo { + margin-left: sg-layout-width(logo-shopify) / 2 * -1 + sg-offset-x(page-nav) / 2; + } +} + +.SearchBox { + box-shadow: 0 1rem 6rem rgba(0, 0, 0, 0.18), 0 0.3rem 1rem rgba(0, 0, 0, 0.17) !important; +} + +.demo { + background-position: 0 0, 0 spacing(tight), spacing(tight) -1 * spacing(tight), -1 * spacing(tight) 0; +} + +/* #4604 */ +.this-will-not-wrap { + background: transparent url(/long/path/to/dummy-image.svg) -1000px center no-repeat; +} + +.this-will-wrap-correctly { + background: transparent url(/long/path/to/dummy-image.svg) 1000px center no-repeat; +} + +.this-will-also-wrap-but-incorrectly { + background: transparent url(/even/longer/path/to/dummy-image.svg) -1000px center no-repeat; +} + diff --git a/tests/format/jsx/template/__snapshots__/format.test.js.snap b/tests/format/jsx/template/__snapshots__/format.test.js.snap index 1f0652ef3..f9a4fa7b1 100644 --- a/tests/format/jsx/template/__snapshots__/format.test.js.snap +++ b/tests/format/jsx/template/__snapshots__/format.test.js.snap @@ -25,6 +25,15 @@ printWidth: 80 \`} ; +// #5886 +; + =====================================output===================================== ; +// #5886 +; + ================================================================================ `; diff --git a/tests/format/jsx/template/styled-components.js b/tests/format/jsx/template/styled-components.js index 3377c4078..0c5e0cd56 100644 --- a/tests/format/jsx/template/styled-components.js +++ b/tests/format/jsx/template/styled-components.js @@ -16,3 +16,12 @@ } `} ; + +// #5886 +; diff --git a/tests/integration/cli/special-characters-in-path/ignore-emoji/ignored/α.js b/tests/integration/cli/special-characters-in-path/ignore-emoji/ignored/α.js new file mode 100644 index 000000000..5f66344dc --- /dev/null +++ b/tests/integration/cli/special-characters-in-path/ignore-emoji/ignored/α.js @@ -0,0 +1,4 @@ +// #6250 +const foo += 'bar' +;