Skip to content

Commit

Permalink
Add specs for color.
Browse files Browse the repository at this point in the history
  • Loading branch information
Awjin committed Mar 3, 2020
1 parent 420468a commit 0e2c07a
Show file tree
Hide file tree
Showing 14 changed files with 1,852 additions and 0 deletions.
117 changes: 117 additions & 0 deletions spec/operators/addition/color.hrx
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<===> boolean/true/input.scss
$left: #000;
$right: true;
a {b: $left + $right}

<===> boolean/true/output.css
a {
b: #000true;
}

<===>
<==============================================================================>
<===> boolean/false/input.scss
$left: #000;
$right: false;
a {b: $left + $right}

<===> boolean/false/output.css
a {
b: #000false;
}

<===>
<==============================================================================>
<===> list/input.scss
$left: #000;
$right: [0];
a {b: $left + $right}

<===> list/output.css
a {
b: #000[0];
}

<===>
<==============================================================================>
<===> null/options.yml
---
:todo:
- sass/libsass#2413

<===> null/input.scss
$left: #000;
$right: null;
a {b: $left + $right}

<===> null/output.css
a {
b: #000;
}

<===>
<==============================================================================>
<===> string/input.scss
$left: #000;
$right: "0";
a {b: $left + $right}

<===> string/output.css
a {
b: "#0000";
}

<===>
<==============================================================================>
<===> error/color/options.yml
---
:todo:
- sass/libsass#2413

<===> error/color/input.scss
$left: #000;
$right: #000;
a {b: $left + $right}

<===> error/color/error
Error: Undefined operation "#000 + #000".
,
3 | a {b: $left + $right}
| ^^^^^^^^^^^^^^
'
input.scss 3:7 root stylesheet

<===>
<==============================================================================>
<===> error/map/input.scss
$left: #000;
$right: ("key": 0);
a {b: $left + $right}

<===> error/map/error
Error: ("key": 0) isn't a valid CSS value.
,
3 | a {b: $left + $right}
| ^^^^^^^^^^^^^^
'
input.scss 3:7 root stylesheet

<===>
<==============================================================================>
<===> error/number/options.yml
---
:todo:
- sass/libsass#2413

<===> error/number/input.scss
$left: #000;
$right: 0;
a {b: $left + $right}

<===> error/number/error
Error: Undefined operation "#000 + 0".
,
3 | a {b: $left + $right}
| ^^^^^^^^^^^^^^
'
input.scss 3:7 root stylesheet
93 changes: 93 additions & 0 deletions spec/operators/conjunction/color.hrx
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<===> boolean/true/input.scss
$left: #000;
$right: true;
a {b: $left and $right}

<===> boolean/true/output.css
a {
b: true;
}

<===>
<==============================================================================>
<===> boolean/false/input.scss
$left: #000;
$right: false;
a {b: $left and $right}

<===> boolean/false/output.css
a {
b: false;
}

<===>
<==============================================================================>
<===> color/input.scss
$left: #000;
$right: #000;
a {b: $left and $right}

<===> color/output.css
a {
b: #000;
}

<===>
<==============================================================================>
<===> list/input.scss
$left: #000;
$right: [0];
a {b: $left and $right}

<===> list/output.css
a {
b: [0];
}

<===>
<==============================================================================>
<===> null/input.scss
$left: #000;
$right: null;
a {b: $left and $right}

<===> null/output.css

<===>
<==============================================================================>
<===> number/input.scss
$left: #000;
$right: 0;
a {b: $left and $right}

<===> number/output.css
a {
b: 0;
}

<===>
<==============================================================================>
<===> string/input.scss
$left: #000;
$right: "0";
a {b: $left and $right}

<===> string/output.css
a {
b: "0";
}

<===>
<==============================================================================>
<===> error/map/input.scss
$left: #000;
$right: ("key": 0);
a {b: $left and $right}

<===> error/map/error
Error: ("key": 0) isn't a valid CSS value.
,
3 | a {b: $left and $right}
| ^^^^^^^^^^^^^^^^
'
input.scss 3:7 root stylesheet
93 changes: 93 additions & 0 deletions spec/operators/disjunction/color.hrx
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<===> boolean/true/input.scss
$left: #000;
$right: true;
a {b: $left or $right}

<===> boolean/true/output.css
a {
b: #000;
}

<===>
<==============================================================================>
<===> boolean/false/input.scss
$left: #000;
$right: false;
a {b: $left or $right}

<===> boolean/false/output.css
a {
b: #000;
}

<===>
<==============================================================================>
<===> color/input.scss
$left: #000;
$right: #000;
a {b: $left or $right}

<===> color/output.css
a {
b: #000;
}

<===>
<==============================================================================>
<===> list/input.scss
$left: #000;
$right: [0];
a {b: $left or $right}

<===> list/output.css
a {
b: #000;
}

<===>
<==============================================================================>
<===> map/input.scss
$left: #000;
$right: ("key": 0);
a {b: $left or $right}

<===> map/output.css
a {
b: #000;
}

<===>
<==============================================================================>
<===> null/input.scss
$left: #000;
$right: null;
a {b: $left or $right}

<===> null/output.css
a {
b: #000;
}

<===>
<==============================================================================>
<===> number/input.scss
$left: #000;
$right: 0;
a {b: $left or $right}

<===> number/output.css
a {
b: #000;
}

<===>
<==============================================================================>
<===> string/input.scss
$left: #000;
$right: "0";
a {b: $left or $right}

<===> string/output.css
a {
b: #000;
}
Loading

0 comments on commit 0e2c07a

Please sign in to comment.