From 7115626c8473977d31b53399eec1a6f6916c6f6b Mon Sep 17 00:00:00 2001 From: awjin Date: Mon, 2 Mar 2020 16:18:02 -0800 Subject: [PATCH] Add specs for color. --- spec/operators/addition/color.hrx | 117 ++++++++++++ spec/operators/conjunction/color.hrx | 93 +++++++++ spec/operators/disjunction/color.hrx | 93 +++++++++ spec/operators/division/color.hrx | 117 ++++++++++++ spec/operators/equality/color.hrx | 106 +++++++++++ spec/operators/greater_than/color.hrx | 178 ++++++++++++++++++ .../greater_than_or_equals/color.hrx | 178 ++++++++++++++++++ spec/operators/inequality/color.hrx | 106 +++++++++++ spec/operators/less_than/color.hrx | 178 ++++++++++++++++++ spec/operators/less_than_or_equals/color.hrx | 178 ++++++++++++++++++ spec/operators/modulo/color.hrx | 172 +++++++++++++++++ spec/operators/multiplication/color.hrx | 172 +++++++++++++++++ spec/operators/subtraction/color.hrx | 117 ++++++++++++ spec/values/color.hrx | 47 +++++ 14 files changed, 1852 insertions(+) create mode 100644 spec/operators/addition/color.hrx create mode 100644 spec/operators/conjunction/color.hrx create mode 100644 spec/operators/disjunction/color.hrx create mode 100644 spec/operators/division/color.hrx create mode 100644 spec/operators/equality/color.hrx create mode 100644 spec/operators/greater_than/color.hrx create mode 100644 spec/operators/greater_than_or_equals/color.hrx create mode 100644 spec/operators/inequality/color.hrx create mode 100644 spec/operators/less_than/color.hrx create mode 100644 spec/operators/less_than_or_equals/color.hrx create mode 100644 spec/operators/modulo/color.hrx create mode 100644 spec/operators/multiplication/color.hrx create mode 100644 spec/operators/subtraction/color.hrx create mode 100644 spec/values/color.hrx diff --git a/spec/operators/addition/color.hrx b/spec/operators/addition/color.hrx new file mode 100644 index 0000000000..4a4876d3c6 --- /dev/null +++ b/spec/operators/addition/color.hrx @@ -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 diff --git a/spec/operators/conjunction/color.hrx b/spec/operators/conjunction/color.hrx new file mode 100644 index 0000000000..9e8dc6676c --- /dev/null +++ b/spec/operators/conjunction/color.hrx @@ -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 diff --git a/spec/operators/disjunction/color.hrx b/spec/operators/disjunction/color.hrx new file mode 100644 index 0000000000..407ec1071f --- /dev/null +++ b/spec/operators/disjunction/color.hrx @@ -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; +} diff --git a/spec/operators/division/color.hrx b/spec/operators/division/color.hrx new file mode 100644 index 0000000000..6bcf10a53e --- /dev/null +++ b/spec/operators/division/color.hrx @@ -0,0 +1,117 @@ +<===> boolean/true/input.scss +$left: #000; +$right: true; +a {b: $left / $right} + +<===> boolean/true/output.css +a { + b: #000/true; +} + +<===> +<==============================================================================> +<===> boolean/false/input.scss +$left: #000; +$right: false; +a {b: $left / $right} + +<===> boolean/false/output.css +a { + b: #000/false; +} + +<===> +<==============================================================================> +<===> 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: #000/"0"; +} + +<===> +<==============================================================================> +<===> 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 diff --git a/spec/operators/equality/color.hrx b/spec/operators/equality/color.hrx new file mode 100644 index 0000000000..10c792bd9b --- /dev/null +++ b/spec/operators/equality/color.hrx @@ -0,0 +1,106 @@ +<===> boolean/true/input.scss +$left: #000; +$right: true; +a {b: $left == $right} + +<===> boolean/true/output.css +a { + b: false; +} + +<===> +<==============================================================================> +<===> boolean/false/input.scss +$left: #000; +$right: false; +a {b: $left == $right} + +<===> boolean/false/output.css +a { + b: false; +} + + +<===> +<==============================================================================> +<===> color/equal/input.scss +$left: #000; +$right: #000; +a {b: $left == $right} + +<===> color/equal/output.css +a { + b: true; +} + +<===> +<==============================================================================> +<===> color/inequal/input.scss +$left: #000; +$right: #111; +a {b: $left == $right} + +<===> color/inequal/output.css +a { + b: false; +} + +<===> +<==============================================================================> +<===> list/input.scss +$left: #000; +$right: [0]; +a {b: $left == $right} + +<===> list/output.css +a { + b: false; +} + +<===> +<==============================================================================> +<===> map/input.scss +$left: #000; +$right: ("key": 0); +a {b: $left == $right} + +<===> map/output.css +a { + b: false; +} + +<===> +<==============================================================================> +<===> null/input.scss +$left: #000; +$right: null; +a {b: $left == $right} + +<===> null/output.css +a { + b: false; +} + +<===> +<==============================================================================> +<===> number/input.scss +$left: #000; +$right: 0; +a {b: $left == $right} + +<===> number/output.css +a { + b: false; +} + +<===> +<==============================================================================> +<===> string/input.scss +$left: #000; +$right: "#000"; +a {b: $left == $right} + +<===> string/output.css +a { + b: false; +} diff --git a/spec/operators/greater_than/color.hrx b/spec/operators/greater_than/color.hrx new file mode 100644 index 0000000000..5e5b9f61fb --- /dev/null +++ b/spec/operators/greater_than/color.hrx @@ -0,0 +1,178 @@ +<===> error/boolean/true/input.scss +$left: #000; +$right: true; +a {b: $left > $right} + +<===> error/boolean/true/error +Error: Undefined operation "#000 > true". + , +3 | a {b: $left > $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/boolean/true/error-libsass +Error: Undefined operation: "#000 gt true". + , +3 | a {b: $left > $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> error/boolean/false/input.scss +$left: #000; +$right: false; +a {b: $left > $right} + +<===> error/boolean/false/error +Error: Undefined operation "#000 > false". + , +3 | a {b: $left > $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/boolean/false/error-libsass +Error: Undefined operation: "#000 gt false". + , +3 | a {b: $left > $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> 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/list/input.scss +$left: #000; +$right: [0]; +a {b: $left > $right} + +<===> error/list/error +Error: Undefined operation "#000 > [0]". + , +3 | a {b: $left > $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/list/error-libsass +Error: Undefined operation: "#000 gt [0]". + , +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: Undefined operation "#000 > ("key": 0)". + , +3 | a {b: $left > $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/map/error-libsass +Error: Undefined operation: "#000 gt ("key": 0)". + , +3 | a {b: $left > $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> error/null/input.scss +$left: #000; +$right: null; +a {b: $left > $right} + +<===> error/null/error +Error: Undefined operation "#000 > null". + , +3 | a {b: $left > $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/null/error-libsass +Error: Undefined operation: "#000 gt null". + , +3 | a {b: $left > $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> 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 + +<===> error/number/error-libsass +Error: Undefined operation: "#000 gt 0". + , +3 | a {b: $left > $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> error/string/input.scss +$left: #000; +$right: "0"; +a {b: $left > $right} + +<===> error/string/error +Error: Undefined operation "#000 > "0"". + , +3 | a {b: $left > $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/string/error-libsass +Error: Undefined operation: "#000 gt "0"". + , +3 | a {b: $left > $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet diff --git a/spec/operators/greater_than_or_equals/color.hrx b/spec/operators/greater_than_or_equals/color.hrx new file mode 100644 index 0000000000..ed1fc535f7 --- /dev/null +++ b/spec/operators/greater_than_or_equals/color.hrx @@ -0,0 +1,178 @@ +<===> error/boolean/true/input.scss +$left: #000; +$right: true; +a {b: $left >= $right} + +<===> error/boolean/true/error +Error: Undefined operation "#000 >= true". + , +3 | a {b: $left >= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/boolean/true/error-libsass +Error: Undefined operation: "#000 gte true". + , +3 | a {b: $left >= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> error/boolean/false/input.scss +$left: #000; +$right: false; +a {b: $left >= $right} + +<===> error/boolean/false/error +Error: Undefined operation "#000 >= false". + , +3 | a {b: $left >= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/boolean/false/error-libsass +Error: Undefined operation: "#000 gte false". + , +3 | a {b: $left >= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> 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/list/input.scss +$left: #000; +$right: [0]; +a {b: $left >= $right} + +<===> error/list/error +Error: Undefined operation "#000 >= [0]". + , +3 | a {b: $left >= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/list/error-libsass +Error: Undefined operation: "#000 gte [0]". + , +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: Undefined operation "#000 >= ("key": 0)". + , +3 | a {b: $left >= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/map/error-libsass +Error: Undefined operation: "#000 gte ("key": 0)". + , +3 | a {b: $left >= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> error/null/input.scss +$left: #000; +$right: null; +a {b: $left >= $right} + +<===> error/null/error +Error: Undefined operation "#000 >= null". + , +3 | a {b: $left >= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/null/error-libsass +Error: Undefined operation: "#000 gte null". + , +3 | a {b: $left >= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> 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 + +<===> error/number/error-libsass +Error: Undefined operation: "#000 gte 0". + , +3 | a {b: $left >= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> error/string/input.scss +$left: #000; +$right: "0"; +a {b: $left >= $right} + +<===> error/string/error +Error: Undefined operation "#000 >= "0"". + , +3 | a {b: $left >= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/string/error-libsass +Error: Undefined operation: "#000 gte "0"". + , +3 | a {b: $left >= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet diff --git a/spec/operators/inequality/color.hrx b/spec/operators/inequality/color.hrx new file mode 100644 index 0000000000..207ec12454 --- /dev/null +++ b/spec/operators/inequality/color.hrx @@ -0,0 +1,106 @@ +<===> boolean/true/input.scss +$left: #000; +$right: true; +a {b: $left != $right} + +<===> boolean/true/output.css +a { + b: true; +} + +<===> +<==============================================================================> +<===> boolean/false/input.scss +$left: #000; +$right: false; +a {b: $left != $right} + +<===> boolean/false/output.css +a { + b: true; +} + + +<===> +<==============================================================================> +<===> color/equal/input.scss +$left: #000; +$right: #000; +a {b: $left != $right} + +<===> color/equal/output.css +a { + b: false; +} + +<===> +<==============================================================================> +<===> color/inequal/input.scss +$left: #000; +$right: #111; +a {b: $left != $right} + +<===> color/inequal/output.css +a { + b: true; +} + +<===> +<==============================================================================> +<===> list/input.scss +$left: #000; +$right: [0]; +a {b: $left != $right} + +<===> list/output.css +a { + b: true; +} + +<===> +<==============================================================================> +<===> map/input.scss +$left: #000; +$right: ("key": 0); +a {b: $left != $right} + +<===> map/output.css +a { + b: true; +} + +<===> +<==============================================================================> +<===> null/input.scss +$left: #000; +$right: null; +a {b: $left != $right} + +<===> null/output.css +a { + b: true; +} + +<===> +<==============================================================================> +<===> number/input.scss +$left: #000; +$right: 0; +a {b: $left != $right} + +<===> number/output.css +a { + b: true; +} + +<===> +<==============================================================================> +<===> string/input.scss +$left: #000; +$right: "#000"; +a {b: $left != $right} + +<===> string/output.css +a { + b: true; +} diff --git a/spec/operators/less_than/color.hrx b/spec/operators/less_than/color.hrx new file mode 100644 index 0000000000..8630f44a0d --- /dev/null +++ b/spec/operators/less_than/color.hrx @@ -0,0 +1,178 @@ +<===> error/boolean/true/input.scss +$left: #000; +$right: true; +a {b: $left < $right} + +<===> error/boolean/true/error +Error: Undefined operation "#000 < true". + , +3 | a {b: $left < $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/boolean/true/error-libsass +Error: Undefined operation: "#000 lt true". + , +3 | a {b: $left < $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> error/boolean/false/input.scss +$left: #000; +$right: false; +a {b: $left < $right} + +<===> error/boolean/false/error +Error: Undefined operation "#000 < false". + , +3 | a {b: $left < $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/boolean/false/error-libsass +Error: Undefined operation: "#000 lt false". + , +3 | a {b: $left < $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> 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/list/input.scss +$left: #000; +$right: [0]; +a {b: $left < $right} + +<===> error/list/error +Error: Undefined operation "#000 < [0]". + , +3 | a {b: $left < $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/list/error-libsass +Error: Undefined operation: "#000 lt [0]". + , +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: Undefined operation "#000 < ("key": 0)". + , +3 | a {b: $left < $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/map/error-libsass +Error: Undefined operation: "#000 lt ("key": 0)". + , +3 | a {b: $left < $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> error/null/input.scss +$left: #000; +$right: null; +a {b: $left < $right} + +<===> error/null/error +Error: Undefined operation "#000 < null". + , +3 | a {b: $left < $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/null/error-libsass +Error: Undefined operation: "#000 lt null". + , +3 | a {b: $left < $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> 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 + +<===> error/number/error-libsass +Error: Undefined operation: "#000 lt 0". + , +3 | a {b: $left < $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> error/string/input.scss +$left: #000; +$right: "0"; +a {b: $left < $right} + +<===> error/string/error +Error: Undefined operation "#000 < "0"". + , +3 | a {b: $left < $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/string/error-libsass +Error: Undefined operation: "#000 lt "0"". + , +3 | a {b: $left < $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet diff --git a/spec/operators/less_than_or_equals/color.hrx b/spec/operators/less_than_or_equals/color.hrx new file mode 100644 index 0000000000..40401b2356 --- /dev/null +++ b/spec/operators/less_than_or_equals/color.hrx @@ -0,0 +1,178 @@ +<===> error/boolean/true/input.scss +$left: #000; +$right: true; +a {b: $left <= $right} + +<===> error/boolean/true/error +Error: Undefined operation "#000 <= true". + , +3 | a {b: $left <= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/boolean/true/error-libsass +Error: Undefined operation: "#000 lte true". + , +3 | a {b: $left <= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> error/boolean/false/input.scss +$left: #000; +$right: false; +a {b: $left <= $right} + +<===> error/boolean/false/error +Error: Undefined operation "#000 <= false". + , +3 | a {b: $left <= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/boolean/false/error-libsass +Error: Undefined operation: "#000 lte false". + , +3 | a {b: $left <= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> 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/list/input.scss +$left: #000; +$right: [0]; +a {b: $left <= $right} + +<===> error/list/error +Error: Undefined operation "#000 <= [0]". + , +3 | a {b: $left <= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/list/error-libsass +Error: Undefined operation: "#000 lte [0]". + , +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: Undefined operation "#000 <= ("key": 0)". + , +3 | a {b: $left <= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/map/error-libsass +Error: Undefined operation: "#000 lte ("key": 0)". + , +3 | a {b: $left <= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> error/null/input.scss +$left: #000; +$right: null; +a {b: $left <= $right} + +<===> error/null/error +Error: Undefined operation "#000 <= null". + , +3 | a {b: $left <= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/null/error-libsass +Error: Undefined operation: "#000 lte null". + , +3 | a {b: $left <= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> 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 + +<===> error/number/error-libsass +Error: Undefined operation: "#000 lte 0". + , +3 | a {b: $left <= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> error/string/input.scss +$left: #000; +$right: "0"; +a {b: $left <= $right} + +<===> error/string/error +Error: Undefined operation "#000 <= "0"". + , +3 | a {b: $left <= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/string/error-libsass +Error: Undefined operation: "#000 lte "0"". + , +3 | a {b: $left <= $right} + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet diff --git a/spec/operators/modulo/color.hrx b/spec/operators/modulo/color.hrx new file mode 100644 index 0000000000..29e09fb0ba --- /dev/null +++ b/spec/operators/modulo/color.hrx @@ -0,0 +1,172 @@ +<===> error/boolean/true/input.scss +$left: #000; +$right: true; +a {b: $left % $right} + +<===> error/boolean/true/error +Error: Undefined operation "#000 % true". + , +3 | a {b: $left % $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/boolean/true/error-libsass +Error: Undefined operation: "#000 mod true". + , +3 | a {b: $left % $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> error/boolean/false/input.scss +$left: #000; +$right: false; +a {b: $left % $right} + +<===> error/boolean/false/error +Error: Undefined operation "#000 % false". + , +3 | a {b: $left % $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/boolean/false/error-libsass +Error: Undefined operation: "#000 mod false". + , +3 | a {b: $left % $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> 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/list/input.scss +$left: #000; +$right: [0]; +a {b: $left % $right} + +<===> error/list/error +Error: Undefined operation "#000 % [0]". + , +3 | a {b: $left % $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/list/error-libsass +Error: Undefined operation: "#000 mod [0]". + , +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: Undefined operation "#000 % ("key": 0)". + , +3 | a {b: $left % $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/map/error-libsass +Error: ("key": 0) isn't a valid CSS value. + , +3 | a {b: $left % $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> error/color/options.yml +--- +:todo: +- sass/libsass#2413 + +<===> error/null/input.scss +$left: #000; +$right: null; +a {b: $left % $right} + +<===> error/null/error +Error: Undefined operation "#000 % null". + , +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 + +<===> +<==============================================================================> +<===> error/string/input.scss +$left: #000; +$right: "0"; +a {b: $left % $right} + +<===> error/string/error +Error: Undefined operation "#000 % "0"". + , +3 | a {b: $left % $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/string/error-libsass +Error: Undefined operation: "#000 mod "0"". + , +3 | a {b: $left % $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet diff --git a/spec/operators/multiplication/color.hrx b/spec/operators/multiplication/color.hrx new file mode 100644 index 0000000000..8bc4b19bd7 --- /dev/null +++ b/spec/operators/multiplication/color.hrx @@ -0,0 +1,172 @@ +<===> error/boolean/true/input.scss +$left: #000; +$right: true; +a {b: $left * $right} + +<===> error/boolean/true/error +Error: Undefined operation "#000 * true". + , +3 | a {b: $left * $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/boolean/true/error-libsass +Error: Undefined operation: "#000 times true". + , +3 | a {b: $left * $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> error/boolean/false/input.scss +$left: #000; +$right: false; +a {b: $left * $right} + +<===> error/boolean/false/error +Error: Undefined operation "#000 * false". + , +3 | a {b: $left * $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/boolean/false/error-libsass +Error: Undefined operation: "#000 times false". + , +3 | a {b: $left * $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> 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/list/input.scss +$left: #000; +$right: [0]; +a {b: $left * $right} + +<===> error/list/error +Error: Undefined operation "#000 * [0]". + , +3 | a {b: $left * $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/list/error-libsass +Error: Undefined operation: "#000 times [0]". + , +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: Undefined operation "#000 * ("key": 0)". + , +3 | a {b: $left * $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/map/error-libsass +Error: ("key": 0) isn't a valid CSS value. + , +3 | a {b: $left * $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> +<==============================================================================> +<===> error/null/options.yml +--- +:todo: +- sass/libsass#2413 + +<===> error/null/input.scss +$left: #000; +$right: null; +a {b: $left * $right} + +<===> error/null/error +Error: Undefined operation "#000 * null". + , +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 + +<===> +<==============================================================================> +<===> error/string/input.scss +$left: #000; +$right: "0"; +a {b: $left * $right} + +<===> error/string/error +Error: Undefined operation "#000 * "0"". + , +3 | a {b: $left * $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet + +<===> error/string/error-libsass +Error: Undefined operation: "#000 times "0"". + , +3 | a {b: $left * $right} + | ^^^^^^^^^^^^^^ + ' + input.scss 3:7 root stylesheet diff --git a/spec/operators/subtraction/color.hrx b/spec/operators/subtraction/color.hrx new file mode 100644 index 0000000000..e40371576e --- /dev/null +++ b/spec/operators/subtraction/color.hrx @@ -0,0 +1,117 @@ +<===> boolean/true/input.scss +$left: #000; +$right: true; +a {b: $left - $right} + +<===> boolean/true/output.css +a { + b: #000-true; +} + +<===> +<==============================================================================> +<===> boolean/false/input.scss +$left: #000; +$right: false; +a {b: $left - $right} + +<===> boolean/false/output.css +a { + b: #000-false; +} + +<===> +<==============================================================================> +<===> 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: #000-"0"; +} + +<===> +<==============================================================================> +<===> 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 diff --git a/spec/values/color.hrx b/spec/values/color.hrx new file mode 100644 index 0000000000..e2564fb6ef --- /dev/null +++ b/spec/values/color.hrx @@ -0,0 +1,47 @@ +<===> keyword/input.scss +a {b: black} + +<===> keyword/output.css +a { + b: black; +} + +<===> +<==============================================================================> +<===> hex/3_digits/input.scss +a {b: #000} + +<===> hex/3_digits/output.css +a { + b: #000; +} + +<===> +<==============================================================================> +<===> hex/4_digits/input.scss +a {b: #0000} + +<===> hex/4_digits/output.css +a { + b: #0000; +} + +<===> +<==============================================================================> +<===> hex/6_digits/input.scss +a {b: #000000} + +<===> hex/6_digits/output.css +a { + b: #000000; +} + +<===> +<==============================================================================> +<===> hex/8_digits/input.scss +a {b: #00000000} + +<===> hex/8_digits/output.css +a { + b: #00000000; +}