Skip to content

Commit

Permalink
Migrate plain CSS tests to module system
Browse files Browse the repository at this point in the history
  • Loading branch information
jathak committed Jul 12, 2024
1 parent fa7a2fc commit 6a409f4
Show file tree
Hide file tree
Showing 21 changed files with 243 additions and 243 deletions.
2 changes: 1 addition & 1 deletion spec/css/plain/boolean_operations.hrx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<===> input.scss
@import "plain";
@use "plain";

<===> plain.css
a {
Expand Down
8 changes: 4 additions & 4 deletions spec/css/plain/custom_properties.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Regression tests for sass/dart-sass#1104.
<===>
================================================================================
<===> identifier/input.scss
@import "plain";
@use "plain";

<===> identifier/plain.css
a {--b: c}
Expand All @@ -17,7 +17,7 @@ a {
<===>
================================================================================
<===> color/input.scss
@import "plain";
@use "plain";

<===> color/plain.css
a {--b: #ff0000}
Expand All @@ -30,7 +30,7 @@ a {
<===>
================================================================================
<===> nested/input.scss
@import "plain";
@use "plain";

<===> nested/plain.css
a {--b: {c: d}}
Expand All @@ -43,7 +43,7 @@ a {
<===>
================================================================================
<===> arbitrary_tokens/input.scss
@import "plain";
@use "plain";

<===> arbitrary_tokens/plain.css
a {--b: `~@#$%^&*()_-+={[]}|?/><}
Expand Down
18 changes: 9 additions & 9 deletions spec/css/plain/error/expression/function.hrx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<===> built_in/input.scss
@import 'plain'
@use 'plain'
<===> built_in/plain.css
a {
x: index(1 2 3, 1);
Expand All @@ -11,13 +11,13 @@ Error: This function isn't allowed in plain CSS.
2 | x: index(1 2 3, 1);
| ^^^^^^^^^^^^^^^
'
plain.css 2:6 @import
input.scss 1:9 root stylesheet
plain.css 2:6 @use
input.scss 1:1 root stylesheet

<===>
================================================================================
<===> variable_arguments/input.scss
@import 'plain'
@use 'plain'
<===> variable_arguments/plain.css
a {
x: hsl(0, 100%, 50%...);
Expand All @@ -29,13 +29,13 @@ Error: expected ")".
2 | x: hsl(0, 100%, 50%...);
| ^
'
plain.css 2:22 @import
input.scss 1:9 root stylesheet
plain.css 2:22 @use
input.scss 1:1 root stylesheet

<===>
================================================================================
<===> keyword_arguments/input.scss
@import 'plain'
@use 'plain'
<===> keyword_arguments/plain.css
a {
x: hsl(0, 100%, $lightness: 50%);
Expand All @@ -47,5 +47,5 @@ Error: Sass variables aren't allowed in plain CSS.
2 | x: hsl(0, 100%, $lightness: 50%);
| ^^^^^^^^^^
'
plain.css 2:19 @import
input.scss 1:9 root stylesheet
plain.css 2:19 @use
input.scss 1:1 root stylesheet
24 changes: 12 additions & 12 deletions spec/css/plain/error/expression/interpolation.hrx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<===> calc/input.scss
@import 'plain'
@use 'plain'
<===> calc/plain.css
a {
w: calc(#{1px} + 10%);
Expand All @@ -11,13 +11,13 @@ Error: Interpolation isn't allowed in plain CSS.
2 | w: calc(#{1px} + 10%);
| ^^^^^^
'
plain.css 2:11 @import
input.scss 1:9 root stylesheet
plain.css 2:11 @use
input.scss 1:1 root stylesheet

<===>
================================================================================
<===> identifier/input.scss
@import 'plain'
@use 'plain'
<===> identifier/plain.css
a {
w: x#{y}z;
Expand All @@ -29,13 +29,13 @@ Error: Interpolation isn't allowed in plain CSS.
2 | w: x#{y}z;
| ^^^^
'
plain.css 2:7 @import
input.scss 1:9 root stylesheet
plain.css 2:7 @use
input.scss 1:1 root stylesheet

<===>
================================================================================
<===> quoted_string/input.scss
@import 'plain'
@use 'plain'
<===> quoted_string/plain.css
a {
w: "x#{y}z";
Expand All @@ -47,13 +47,13 @@ Error: Interpolation isn't allowed in plain CSS.
2 | w: "x#{y}z";
| ^^^^
'
plain.css 2:8 @import
input.scss 1:9 root stylesheet
plain.css 2:8 @use
input.scss 1:1 root stylesheet

<===>
================================================================================
<===> standalone/input.scss
@import 'plain'
@use 'plain'
<===> standalone/plain.css
a {
w: #{x};
Expand All @@ -65,5 +65,5 @@ Error: Interpolation isn't allowed in plain CSS.
2 | w: #{x};
| ^^^^
'
plain.css 2:6 @import
input.scss 1:9 root stylesheet
plain.css 2:6 @use
input.scss 1:1 root stylesheet
12 changes: 6 additions & 6 deletions spec/css/plain/error/expression/list.hrx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<===> empty/input.scss
@import 'plain'
@use 'plain'
<===> empty/plain.css
a {
x: ();
Expand All @@ -11,13 +11,13 @@ Error: Expected expression.
2 | x: ();
| ^
'
plain.css 2:7 @import
input.scss 1:9 root stylesheet
plain.css 2:7 @use
input.scss 1:1 root stylesheet

<===>
================================================================================
<===> empty_comma/input.scss
@import 'plain'
@use 'plain'
<===> empty_comma/plain.css
a {
x: (,);
Expand All @@ -29,5 +29,5 @@ Error: Expected expression.
2 | x: (,);
| ^
'
plain.css 2:7 @import
input.scss 1:9 root stylesheet
plain.css 2:7 @use
input.scss 1:1 root stylesheet
6 changes: 3 additions & 3 deletions spec/css/plain/error/expression/map.hrx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<===> input.scss
@import 'plain'
@use 'plain'
<===> plain.css
a {
x: (y: z);
Expand All @@ -11,5 +11,5 @@ Error: expected ")".
2 | x: (y: z);
| ^
'
plain.css 2:8 @import
input.scss 1:9 root stylesheet
plain.css 2:8 @use
input.scss 1:1 root stylesheet
60 changes: 30 additions & 30 deletions spec/css/plain/error/expression/operation.hrx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<===> addition/input.scss
@import 'plain'
@use 'plain'
<===> addition/plain.css
a {
x: y + z;
Expand All @@ -11,13 +11,13 @@ Error: Operators aren't allowed in plain CSS.
2 | x: y + z;
| ^
'
plain.css 2:8 @import
input.scss 1:9 root stylesheet
plain.css 2:8 @use
input.scss 1:1 root stylesheet

<===>
================================================================================
<===> subtraction/input.scss
@import 'plain'
@use 'plain'
<===> subtraction/plain.css
a {
x: y - z;
Expand All @@ -29,13 +29,13 @@ Error: Operators aren't allowed in plain CSS.
2 | x: y - z;
| ^
'
plain.css 2:8 @import
input.scss 1:9 root stylesheet
plain.css 2:8 @use
input.scss 1:1 root stylesheet

<===>
================================================================================
<===> multiplication/input.scss
@import 'plain'
@use 'plain'
<===> multiplication/plain.css
a {
x: y * z;
Expand All @@ -47,13 +47,13 @@ Error: Operators aren't allowed in plain CSS.
2 | x: y * z;
| ^
'
plain.css 2:8 @import
input.scss 1:9 root stylesheet
plain.css 2:8 @use
input.scss 1:1 root stylesheet

<===>
================================================================================
<===> modulo/input.scss
@import 'plain'
@use 'plain'
<===> modulo/plain.css
a {
x: y % z;
Expand All @@ -65,13 +65,13 @@ Error: Operators aren't allowed in plain CSS.
2 | x: y % z;
| ^
'
plain.css 2:8 @import
input.scss 1:9 root stylesheet
plain.css 2:8 @use
input.scss 1:1 root stylesheet

<===>
================================================================================
<===> less_than/input.scss
@import 'plain'
@use 'plain'
<===> less_than/plain.css
a {
x: y < z;
Expand All @@ -83,13 +83,13 @@ Error: Operators aren't allowed in plain CSS.
2 | x: y < z;
| ^
'
plain.css 2:8 @import
input.scss 1:9 root stylesheet
plain.css 2:8 @use
input.scss 1:1 root stylesheet

<===>
================================================================================
<===> less_than_or_equal/input.scss
@import 'plain'
@use 'plain'
<===> less_than_or_equal/plain.css
a {
x: y <= z;
Expand All @@ -101,13 +101,13 @@ Error: Operators aren't allowed in plain CSS.
2 | x: y <= z;
| ^^
'
plain.css 2:8 @import
input.scss 1:9 root stylesheet
plain.css 2:8 @use
input.scss 1:1 root stylesheet

<===>
================================================================================
<===> greater_than/input.scss
@import 'plain'
@use 'plain'
<===> greater_than/plain.css
a {
x: y > z;
Expand All @@ -119,13 +119,13 @@ Error: Operators aren't allowed in plain CSS.
2 | x: y > z;
| ^
'
plain.css 2:8 @import
input.scss 1:9 root stylesheet
plain.css 2:8 @use
input.scss 1:1 root stylesheet

<===>
================================================================================
<===> greater_than_or_equal/input.scss
@import 'plain'
@use 'plain'
<===> greater_than_or_equal/plain.css
a {
x: y >= z;
Expand All @@ -137,13 +137,13 @@ Error: Operators aren't allowed in plain CSS.
2 | x: y >= z;
| ^^
'
plain.css 2:8 @import
input.scss 1:9 root stylesheet
plain.css 2:8 @use
input.scss 1:1 root stylesheet

<===>
================================================================================
<===> equals/input.scss
@import 'plain'
@use 'plain'
<===> equals/plain.css
a {
x: y == z;
Expand All @@ -155,13 +155,13 @@ Error: Operators aren't allowed in plain CSS.
2 | x: y == z;
| ^^
'
plain.css 2:8 @import
input.scss 1:9 root stylesheet
plain.css 2:8 @use
input.scss 1:1 root stylesheet

<===>
================================================================================
<===> not_equals/input.scss
@import 'plain'
@use 'plain'
<===> not_equals/plain.css
a {
x: y != z;
Expand All @@ -173,5 +173,5 @@ Error: Operators aren't allowed in plain CSS.
2 | x: y != z;
| ^^
'
plain.css 2:8 @import
input.scss 1:9 root stylesheet
plain.css 2:8 @use
input.scss 1:1 root stylesheet
6 changes: 3 additions & 3 deletions spec/css/plain/error/expression/parent_selector.hrx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<===> input.scss
@import 'plain'
@use 'plain'
<===> plain.css
a {
x: &;
Expand All @@ -11,5 +11,5 @@ Error: The parent selector isn't allowed in plain CSS.
2 | x: &;
| ^
'
plain.css 2:6 @import
input.scss 1:9 root stylesheet
plain.css 2:6 @use
input.scss 1:1 root stylesheet
Loading

0 comments on commit 6a409f4

Please sign in to comment.