From c4451950f802e19d85ae4467487139d2fcee6990 Mon Sep 17 00:00:00 2001 From: Rasmus Kaj Date: Sun, 27 Oct 2024 12:12:16 +0100 Subject: [PATCH] Update sass-spec to 2024-10-18. Lots of deprecation stuff that I don't yet have the infrastructure to support properly. --- CHANGELOG.md | 2 +- .../spec/core_functions/color/adjust_hue.rs | 201 --------------- .../color/adjust_hue/above_max.rs | 16 ++ .../core_functions/color/adjust_hue/alpha.rs | 16 ++ .../core_functions/color/adjust_hue/error.rs | 113 +++++++++ .../color/adjust_hue/fraction.rs | 16 ++ .../core_functions/color/adjust_hue/max.rs | 16 ++ .../core_functions/color/adjust_hue/middle.rs | 16 ++ .../core_functions/color/adjust_hue/min.rs | 16 ++ .../core_functions/color/adjust_hue/mod.rs | 26 ++ .../core_functions/color/adjust_hue/named.rs | 16 ++ .../color/adjust_hue/negative.rs | 16 ++ .../core_functions/color/adjust_hue/units.rs | 43 ++++ .../spec/core_functions/color/complement.rs | 3 +- .../tests/spec/core_functions/color/darken.rs | 78 +++++- .../spec/core_functions/color/desaturate.rs | 78 +++++- .../spec/core_functions/color/fade_in.rs | 89 +++++-- .../spec/core_functions/color/fade_out.rs | 89 +++++-- .../spec/core_functions/color/invert/error.rs | 97 +++++++- .../color/lab/special_functions/alpha.rs | 80 +++--- .../color/lab/special_functions/no_alpha.rs | 114 +++++---- .../spec/core_functions/color/lighten.rs | 78 +++++- .../spec/core_functions/color/mix/alpha.rs | 15 +- .../core_functions/color/mix/both_weights.rs | 55 +++-- .../spec/core_functions/color/mix/error.rs | 230 +++++++++++++++--- .../color/mix/explicit_method.rs | 14 +- .../color/mix/explicit_weight.rs | 15 +- .../color/mix/hue_interpolation.rs | 33 ++- .../core_functions/color/mix/mixed_spaces.rs | 3 +- .../spec/core_functions/color/mix/named.rs | 6 +- .../core_functions/color/mix/predefined.rs | 12 +- .../spec/core_functions/color/mix/units.rs | 6 +- .../core_functions/color/mix/unweighted.rs | 16 +- .../spec/core_functions/color/saturate.rs | 72 +++++- .../spec/core_functions/global/color/error.rs | 102 ++++++-- .../meta/get_function/same_module.rs | 13 + rsass/tests/spec/css/comment.rs | 28 +++ .../css/plain/error/statement/style_rule.rs | 9 +- rsass/tests/spec/css/plain/import/in_css.rs | 37 ++- .../spec/css/plain/import/partial_conflict.rs | 13 +- .../spec/directives/forward/error/load.rs | 17 +- .../forward/error/member/import_to_forward.rs | 36 ++- .../spec/directives/import/error/conflict.rs | 54 +++- .../spec/directives/import/error/member.rs | 36 ++- .../spec/directives/import/error/not_found.rs | 42 +++- rsass/tests/spec/directives/import/load.rs | 16 +- .../spec/directives/test_use/error/load.rs | 33 ++- .../test_use/error/member/inaccessible.rs | 34 ++- .../imported/at_root_alone.rs | 9 +- .../imported/at_root_alone_itpl.rs | 13 +- .../imported/at_root_postfix.rs | 9 +- .../imported/at_root_prefix.rs | 13 +- .../base_level_parent/imported/basic_alone.rs | 9 +- .../imported/basic_alone_itpl.rs | 13 +- .../imported/basic_postfix.rs | 9 +- .../imported/basic_prefix.rs | 13 +- .../libsass_closed_issues/issue_1266/max.rs | 8 + .../libsass_closed_issues/issue_1266/min.rs | 8 + .../issue_1739/interpolate/both.rs | 24 +- .../issue_1739/interpolate/left.rs | 16 +- .../issue_1739/interpolate/right.rs | 16 +- .../issue_1801/import_cycle.rs | 31 ++- .../libsass_closed_issues/issue_2106/test.rs | 14 +- .../spec/libsass_closed_issues/issue_2304.rs | 9 +- .../issue_1801/simple_import_loop.rs | 22 +- .../issue_2295/error/basic.rs | 9 +- .../issue_2295/error/wrapped.rs | 9 +- rsass/tests/spec/main.rs | 2 +- .../interpolation_operators_precedence.rs | 80 +++--- .../values/calculation/calc/error/syntax.rs | 8 +- .../spec/values/calculation/round/error.rs | 34 ++- rsass/tests/spec/values/colors/equality.rs | 3 +- 72 files changed, 1900 insertions(+), 647 deletions(-) delete mode 100644 rsass/tests/spec/core_functions/color/adjust_hue.rs create mode 100644 rsass/tests/spec/core_functions/color/adjust_hue/above_max.rs create mode 100644 rsass/tests/spec/core_functions/color/adjust_hue/alpha.rs create mode 100644 rsass/tests/spec/core_functions/color/adjust_hue/error.rs create mode 100644 rsass/tests/spec/core_functions/color/adjust_hue/fraction.rs create mode 100644 rsass/tests/spec/core_functions/color/adjust_hue/max.rs create mode 100644 rsass/tests/spec/core_functions/color/adjust_hue/middle.rs create mode 100644 rsass/tests/spec/core_functions/color/adjust_hue/min.rs create mode 100644 rsass/tests/spec/core_functions/color/adjust_hue/mod.rs create mode 100644 rsass/tests/spec/core_functions/color/adjust_hue/named.rs create mode 100644 rsass/tests/spec/core_functions/color/adjust_hue/negative.rs create mode 100644 rsass/tests/spec/core_functions/color/adjust_hue/units.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index f797cba47..0e4810c36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,7 +32,7 @@ project adheres to * Improved parse error handling (Issue #141, PR #201, PR #205). Many parse errors now match the dart sass error message. Also allow "loud" comments in more places. -* Updated sass-spec test suite to 2024-10-10. +* Updated sass-spec test suite to 2024-10-18. ## Release 0.28.10 diff --git a/rsass/tests/spec/core_functions/color/adjust_hue.rs b/rsass/tests/spec/core_functions/color/adjust_hue.rs deleted file mode 100644 index 56153dee2..000000000 --- a/rsass/tests/spec/core_functions/color/adjust_hue.rs +++ /dev/null @@ -1,201 +0,0 @@ -//! Tests auto-converted from "sass-spec/spec/core_functions/color/adjust_hue.hrx" - -#[allow(unused)] -fn runner() -> crate::TestRunner { - super::runner().with_cwd("adjust_hue") -} - -#[test] -fn above_max() { - assert_eq!( - runner().ok("a {b: adjust-hue(red, 540)}\n"), - "a {\ - \n b: aqua;\ - \n}\n" - ); -} -#[test] -fn alpha() { - assert_eq!( - runner().ok("a {b: adjust-hue(rgba(red, 0.1), 359)}\n"), - "a {\ - \n b: rgba(255, 0, 4.25, 0.1);\ - \n}\n" - ); -} -mod error { - #[allow(unused)] - use super::runner; - - #[test] - #[ignore] // wrong error - fn non_legacy() { - assert_eq!( - runner().err( - "a {b: adjust-hue(lch(0% 0 0deg), 10deg)}\n" - ), - "Error: adjust-hue() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.\ - \n ,\ - \n1 | a {b: adjust-hue(lch(0% 0 0deg), 10deg)}\ - \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ - \n \'\ - \n input.scss 1:7 root stylesheet", - ); - } - #[test] - fn too_few_args() { - assert_eq!( - runner().err("a {b: adjust-hue(red)}\n"), - "Error: Missing argument $degrees.\ - \n ,--> input.scss\ - \n1 | a {b: adjust-hue(red)}\ - \n | ^^^^^^^^^^^^^^^ invocation\ - \n \'\ - \n ,--> sass:color\ - \n1 | @function adjust-hue($color, $degrees) {\ - \n | ============================ declaration\ - \n \'\ - \n input.scss 1:7 root stylesheet", - ); - } - #[test] - fn too_many_args() { - assert_eq!( - runner().err("a {b: adjust-hue(red, 1, 2)}\n"), - "Error: Only 2 arguments allowed, but 3 were passed.\ - \n ,--> input.scss\ - \n1 | a {b: adjust-hue(red, 1, 2)}\ - \n | ^^^^^^^^^^^^^^^^^^^^^ invocation\ - \n \'\ - \n ,--> sass:color\ - \n1 | @function adjust-hue($color, $degrees) {\ - \n | ============================ declaration\ - \n \'\ - \n input.scss 1:7 root stylesheet", - ); - } - mod test_type { - #[allow(unused)] - use super::runner; - - #[test] - fn color() { - assert_eq!( - runner().err("a {b: adjust-hue(1, 2)}\n"), - "Error: $color: 1 is not a color.\ - \n ,\ - \n1 | a {b: adjust-hue(1, 2)}\ - \n | ^^^^^^^^^^^^^^^^\ - \n \'\ - \n input.scss 1:7 root stylesheet", - ); - } - #[test] - fn hue() { - assert_eq!( - runner().err("a {b: adjust-hue(red, blue)}\n"), - "Error: $degrees: blue is not a number.\ - \n ,\ - \n1 | a {b: adjust-hue(red, blue)}\ - \n | ^^^^^^^^^^^^^^^^^^^^^\ - \n \'\ - \n input.scss 1:7 root stylesheet", - ); - } - } -} -#[test] -fn fraction() { - assert_eq!( - runner().ok("a {b: adjust-hue(red, 0.5)}\n"), - "a {\ - \n b: rgb(255, 2.125, 0);\ - \n}\n" - ); -} -#[test] -fn max() { - assert_eq!( - runner().ok("a {b: adjust-hue(red, 359)}\n"), - "a {\ - \n b: rgb(255, 0, 4.25);\ - \n}\n" - ); -} -#[test] -fn middle() { - assert_eq!( - runner().ok("a {b: adjust-hue(red, 123)}\n"), - "a {\ - \n b: rgb(0, 255, 12.75);\ - \n}\n" - ); -} -#[test] -fn min() { - assert_eq!( - runner().ok("a {b: adjust-hue(blue, 0)}\n"), - "a {\ - \n b: blue;\ - \n}\n" - ); -} -#[test] -fn named() { - assert_eq!( - runner().ok("a {b: adjust-hue($color: red, $degrees: 123)}\n"), - "a {\ - \n b: rgb(0, 255, 12.75);\ - \n}\n" - ); -} -#[test] -fn negative() { - assert_eq!( - runner().ok("a {b: adjust-hue(red, -180)}\n"), - "a {\ - \n b: aqua;\ - \n}\n" - ); -} -mod units { - #[allow(unused)] - use super::runner; - - #[test] - fn angle() { - assert_eq!( - runner().ok("a {b: adjust-hue(red, 60rad)}\n"), - "a {\ - \n b: rgb(0, 179.576224164, 255);\ - \n}\n" - ); - } - #[test] - fn deg() { - assert_eq!( - runner().ok("a {b: adjust-hue(red, 60deg)}\n"), - "a {\ - \n b: yellow;\ - \n}\n" - ); - } - #[test] - fn unitless() { - assert_eq!( - runner().ok("a {b: adjust-hue(red, 60)}\n"), - "a {\ - \n b: yellow;\ - \n}\n" - ); - } - #[test] - fn unknown() { - assert_eq!( - runner().ok("a {b: adjust-hue(red, 60in)}\n"), - "a {\ - \n b: yellow;\ - \n}\n" - ); - } -} diff --git a/rsass/tests/spec/core_functions/color/adjust_hue/above_max.rs b/rsass/tests/spec/core_functions/color/adjust_hue/above_max.rs new file mode 100644 index 000000000..ddc71044a --- /dev/null +++ b/rsass/tests/spec/core_functions/color/adjust_hue/above_max.rs @@ -0,0 +1,16 @@ +//! Tests auto-converted from "sass-spec/spec/core_functions/color/adjust_hue/above_max.hrx" + +#[allow(unused)] +fn runner() -> crate::TestRunner { + super::runner().with_cwd("above_max") +} + +#[test] +fn test() { + assert_eq!( + runner().ok("a {b: adjust-hue(red, 540)}\n"), + "a {\ + \n b: aqua;\ + \n}\n" + ); +} diff --git a/rsass/tests/spec/core_functions/color/adjust_hue/alpha.rs b/rsass/tests/spec/core_functions/color/adjust_hue/alpha.rs new file mode 100644 index 000000000..d2c03a65d --- /dev/null +++ b/rsass/tests/spec/core_functions/color/adjust_hue/alpha.rs @@ -0,0 +1,16 @@ +//! Tests auto-converted from "sass-spec/spec/core_functions/color/adjust_hue/alpha.hrx" + +#[allow(unused)] +fn runner() -> crate::TestRunner { + super::runner().with_cwd("alpha") +} + +#[test] +fn test() { + assert_eq!( + runner().ok("a {b: adjust-hue(rgba(red, 0.1), 359)}\n"), + "a {\ + \n b: rgba(255, 0, 4.25, 0.1);\ + \n}\n" + ); +} diff --git a/rsass/tests/spec/core_functions/color/adjust_hue/error.rs b/rsass/tests/spec/core_functions/color/adjust_hue/error.rs new file mode 100644 index 000000000..57625245d --- /dev/null +++ b/rsass/tests/spec/core_functions/color/adjust_hue/error.rs @@ -0,0 +1,113 @@ +//! Tests auto-converted from "sass-spec/spec/core_functions/color/adjust_hue/error.hrx" + +#[allow(unused)] +fn runner() -> crate::TestRunner { + super::runner().with_cwd("error") +} + +#[test] +#[ignore] // wrong error +fn non_legacy() { + assert_eq!( + runner().err( + "a {b: adjust-hue(lch(0% 0 0deg), 10deg)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: adjust-hue(lch(0% 0 0deg), 10deg)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: adjust-hue() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.\ + \n ,\ + \n1 | a {b: adjust-hue(lch(0% 0 0deg), 10deg)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet", + ); +} +#[test] +fn too_few_args() { + assert_eq!( + runner().err("a {b: adjust-hue(red)}\n"), + "Error: Missing argument $degrees.\ + \n ,--> input.scss\ + \n1 | a {b: adjust-hue(red)}\ + \n | ^^^^^^^^^^^^^^^ invocation\ + \n \'\ + \n ,--> sass:color\ + \n1 | @function adjust-hue($color, $degrees) {\ + \n | ============================ declaration\ + \n \'\ + \n input.scss 1:7 root stylesheet", + ); +} +#[test] +fn too_many_args() { + assert_eq!( + runner().err("a {b: adjust-hue(red, 1, 2)}\n"), + "Error: Only 2 arguments allowed, but 3 were passed.\ + \n ,--> input.scss\ + \n1 | a {b: adjust-hue(red, 1, 2)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^ invocation\ + \n \'\ + \n ,--> sass:color\ + \n1 | @function adjust-hue($color, $degrees) {\ + \n | ============================ declaration\ + \n \'\ + \n input.scss 1:7 root stylesheet", + ); +} +mod test_type { + #[allow(unused)] + use super::runner; + + #[test] + #[ignore] // wrong error + fn color() { + assert_eq!( + runner().err( + "a {b: adjust-hue(1, 2)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: adjust-hue(1, 2)}\ + \n | ^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $color: 1 is not a color.\ + \n ,\ + \n1 | a {b: adjust-hue(1, 2)}\ + \n | ^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet", + ); + } + #[test] + #[ignore] // wrong error + fn hue() { + assert_eq!( + runner().err( + "a {b: adjust-hue(red, blue)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: adjust-hue(red, blue)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $degrees: blue is not a number.\ + \n ,\ + \n1 | a {b: adjust-hue(red, blue)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet", + ); + } +} diff --git a/rsass/tests/spec/core_functions/color/adjust_hue/fraction.rs b/rsass/tests/spec/core_functions/color/adjust_hue/fraction.rs new file mode 100644 index 000000000..315994919 --- /dev/null +++ b/rsass/tests/spec/core_functions/color/adjust_hue/fraction.rs @@ -0,0 +1,16 @@ +//! Tests auto-converted from "sass-spec/spec/core_functions/color/adjust_hue/fraction.hrx" + +#[allow(unused)] +fn runner() -> crate::TestRunner { + super::runner().with_cwd("fraction") +} + +#[test] +fn test() { + assert_eq!( + runner().ok("a {b: adjust-hue(red, 0.5)}\n"), + "a {\ + \n b: rgb(255, 2.125, 0);\ + \n}\n" + ); +} diff --git a/rsass/tests/spec/core_functions/color/adjust_hue/max.rs b/rsass/tests/spec/core_functions/color/adjust_hue/max.rs new file mode 100644 index 000000000..4171f9416 --- /dev/null +++ b/rsass/tests/spec/core_functions/color/adjust_hue/max.rs @@ -0,0 +1,16 @@ +//! Tests auto-converted from "sass-spec/spec/core_functions/color/adjust_hue/max.hrx" + +#[allow(unused)] +fn runner() -> crate::TestRunner { + super::runner().with_cwd("max") +} + +#[test] +fn test() { + assert_eq!( + runner().ok("a {b: adjust-hue(red, 359)}\n"), + "a {\ + \n b: rgb(255, 0, 4.25);\ + \n}\n" + ); +} diff --git a/rsass/tests/spec/core_functions/color/adjust_hue/middle.rs b/rsass/tests/spec/core_functions/color/adjust_hue/middle.rs new file mode 100644 index 000000000..58ed52bb7 --- /dev/null +++ b/rsass/tests/spec/core_functions/color/adjust_hue/middle.rs @@ -0,0 +1,16 @@ +//! Tests auto-converted from "sass-spec/spec/core_functions/color/adjust_hue/middle.hrx" + +#[allow(unused)] +fn runner() -> crate::TestRunner { + super::runner().with_cwd("middle") +} + +#[test] +fn test() { + assert_eq!( + runner().ok("a {b: adjust-hue(red, 123)}\n"), + "a {\ + \n b: rgb(0, 255, 12.75);\ + \n}\n" + ); +} diff --git a/rsass/tests/spec/core_functions/color/adjust_hue/min.rs b/rsass/tests/spec/core_functions/color/adjust_hue/min.rs new file mode 100644 index 000000000..b8fa7b9f7 --- /dev/null +++ b/rsass/tests/spec/core_functions/color/adjust_hue/min.rs @@ -0,0 +1,16 @@ +//! Tests auto-converted from "sass-spec/spec/core_functions/color/adjust_hue/min.hrx" + +#[allow(unused)] +fn runner() -> crate::TestRunner { + super::runner().with_cwd("min") +} + +#[test] +fn test() { + assert_eq!( + runner().ok("a {b: adjust-hue(blue, 0)}\n"), + "a {\ + \n b: blue;\ + \n}\n" + ); +} diff --git a/rsass/tests/spec/core_functions/color/adjust_hue/mod.rs b/rsass/tests/spec/core_functions/color/adjust_hue/mod.rs new file mode 100644 index 000000000..b86f94071 --- /dev/null +++ b/rsass/tests/spec/core_functions/color/adjust_hue/mod.rs @@ -0,0 +1,26 @@ +//! Tests auto-converted from "sass-spec/spec/core_functions/color/adjust_hue" + +#[allow(unused)] +fn runner() -> crate::TestRunner { + super::runner().with_cwd("adjust_hue") +} + +mod above_max; + +mod alpha; + +mod error; + +mod fraction; + +mod max; + +mod middle; + +mod min; + +mod named; + +mod negative; + +mod units; diff --git a/rsass/tests/spec/core_functions/color/adjust_hue/named.rs b/rsass/tests/spec/core_functions/color/adjust_hue/named.rs new file mode 100644 index 000000000..a707fb21f --- /dev/null +++ b/rsass/tests/spec/core_functions/color/adjust_hue/named.rs @@ -0,0 +1,16 @@ +//! Tests auto-converted from "sass-spec/spec/core_functions/color/adjust_hue/named.hrx" + +#[allow(unused)] +fn runner() -> crate::TestRunner { + super::runner().with_cwd("named") +} + +#[test] +fn test() { + assert_eq!( + runner().ok("a {b: adjust-hue($color: red, $degrees: 123)}\n"), + "a {\ + \n b: rgb(0, 255, 12.75);\ + \n}\n" + ); +} diff --git a/rsass/tests/spec/core_functions/color/adjust_hue/negative.rs b/rsass/tests/spec/core_functions/color/adjust_hue/negative.rs new file mode 100644 index 000000000..045171ee2 --- /dev/null +++ b/rsass/tests/spec/core_functions/color/adjust_hue/negative.rs @@ -0,0 +1,16 @@ +//! Tests auto-converted from "sass-spec/spec/core_functions/color/adjust_hue/negative.hrx" + +#[allow(unused)] +fn runner() -> crate::TestRunner { + super::runner().with_cwd("negative") +} + +#[test] +fn test() { + assert_eq!( + runner().ok("a {b: adjust-hue(red, -180)}\n"), + "a {\ + \n b: aqua;\ + \n}\n" + ); +} diff --git a/rsass/tests/spec/core_functions/color/adjust_hue/units.rs b/rsass/tests/spec/core_functions/color/adjust_hue/units.rs new file mode 100644 index 000000000..54b8c283f --- /dev/null +++ b/rsass/tests/spec/core_functions/color/adjust_hue/units.rs @@ -0,0 +1,43 @@ +//! Tests auto-converted from "sass-spec/spec/core_functions/color/adjust_hue/units.hrx" + +#[allow(unused)] +fn runner() -> crate::TestRunner { + super::runner().with_cwd("units") +} + +#[test] +fn angle() { + assert_eq!( + runner().ok("a {b: adjust-hue(red, 60rad)}\n"), + "a {\ + \n b: rgb(0, 179.576224164, 255);\ + \n}\n" + ); +} +#[test] +fn deg() { + assert_eq!( + runner().ok("a {b: adjust-hue(red, 60deg)}\n"), + "a {\ + \n b: yellow;\ + \n}\n" + ); +} +#[test] +fn unitless() { + assert_eq!( + runner().ok("a {b: adjust-hue(red, 60)}\n"), + "a {\ + \n b: yellow;\ + \n}\n" + ); +} +#[test] +fn unknown() { + assert_eq!( + runner().ok("a {b: adjust-hue(red, 60in)}\n"), + "a {\ + \n b: yellow;\ + \n}\n" + ); +} diff --git a/rsass/tests/spec/core_functions/color/complement.rs b/rsass/tests/spec/core_functions/color/complement.rs index de947d460..812eab325 100644 --- a/rsass/tests/spec/core_functions/color/complement.rs +++ b/rsass/tests/spec/core_functions/color/complement.rs @@ -286,7 +286,8 @@ mod error { #[ignore] // unexepected error fn explicit_space() { assert_eq!( - runner().ok("a {b: complement(red, hwb)}\n"), + runner().ok("@use \"sass:color\";\ + \na {b: color.complement(red, hwb)}\n"), "a {\ \n b: aqua;\ \n}\n" diff --git a/rsass/tests/spec/core_functions/color/darken.rs b/rsass/tests/spec/core_functions/color/darken.rs index 5d8b7f670..6cfb2c872 100644 --- a/rsass/tests/spec/core_functions/color/darken.rs +++ b/rsass/tests/spec/core_functions/color/darken.rs @@ -23,28 +23,50 @@ mod error { use super::runner; #[test] + #[ignore] // wrong error fn too_high() { assert_eq!( - runner().err("a {b: darken(red, 100.001)}\n"), - "Error: $amount: Expected 100.001 to be within 0 and 100.\ + runner().err( + "a {b: darken(red, 100.001)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: darken(red, 100.001)}\ + \n | ^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: Expected 100.001 to be within 0 and 100.\ \n ,\ \n1 | a {b: darken(red, 100.001)}\ \n | ^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } #[test] + #[ignore] // wrong error fn too_low() { assert_eq!( - runner().err("a {b: darken(red, -0.001)}\n"), - "Error: $amount: Expected -0.001 to be within 0 and 100.\ + runner().err( + "a {b: darken(red, -0.001)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: darken(red, -0.001)}\ + \n | ^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: Expected -0.001 to be within 0 and 100.\ \n ,\ \n1 | a {b: darken(red, -0.001)}\ \n | ^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } } #[test] @@ -54,7 +76,15 @@ mod error { runner().err( "a {b: darken(color(srgb 1 1 1), 10%)}\n" ), - "Error: darken() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: darken(color(srgb 1 1 1), 10%)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: darken() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.\ \n ,\ \n1 | a {b: darken(color(srgb 1 1 1), 10%)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ @@ -99,28 +129,50 @@ mod error { use super::runner; #[test] + #[ignore] // wrong error fn color() { assert_eq!( - runner().err("a {b: darken(1, 2)}\n"), - "Error: $color: 1 is not a color.\ + runner().err( + "a {b: darken(1, 2)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: darken(1, 2)}\ + \n | ^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $color: 1 is not a color.\ \n ,\ \n1 | a {b: darken(1, 2)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } #[test] + #[ignore] // wrong error fn lightness() { assert_eq!( - runner().err("a {b: darken(red, blue)}\n"), - "Error: $amount: blue is not a number.\ + runner().err( + "a {b: darken(red, blue)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: darken(red, blue)}\ + \n | ^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: blue is not a number.\ \n ,\ \n1 | a {b: darken(red, blue)}\ \n | ^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } } } diff --git a/rsass/tests/spec/core_functions/color/desaturate.rs b/rsass/tests/spec/core_functions/color/desaturate.rs index 482f91f72..4eba4770e 100644 --- a/rsass/tests/spec/core_functions/color/desaturate.rs +++ b/rsass/tests/spec/core_functions/color/desaturate.rs @@ -23,28 +23,50 @@ mod error { use super::runner; #[test] + #[ignore] // wrong error fn too_high() { assert_eq!( - runner().err("a {b: desaturate(plum, 100.001)}\n"), - "Error: $amount: Expected 100.001 to be within 0 and 100.\ + runner().err( + "a {b: desaturate(plum, 100.001)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: desaturate(plum, 100.001)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: Expected 100.001 to be within 0 and 100.\ \n ,\ \n1 | a {b: desaturate(plum, 100.001)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } #[test] + #[ignore] // wrong error fn too_low() { assert_eq!( - runner().err("a {b: desaturate(plum, -0.001)}\n"), - "Error: $amount: Expected -0.001 to be within 0 and 100.\ + runner().err( + "a {b: desaturate(plum, -0.001)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: desaturate(plum, -0.001)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: Expected -0.001 to be within 0 and 100.\ \n ,\ \n1 | a {b: desaturate(plum, -0.001)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } } #[test] @@ -54,7 +76,15 @@ mod error { runner().err( "a {b: desaturate(color(srgb 1 1 1), 10%)}\n" ), - "Error: desaturate() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: desaturate(color(srgb 1 1 1), 10%)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: desaturate() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.\ \n ,\ \n1 | a {b: desaturate(color(srgb 1 1 1), 10%)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ @@ -120,28 +150,50 @@ mod error { use super::runner; #[test] + #[ignore] // wrong error fn color() { assert_eq!( - runner().err("a {b: desaturate(1, 2)}\n"), - "Error: $color: 1 is not a color.\ + runner().err( + "a {b: desaturate(1, 2)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: desaturate(1, 2)}\ + \n | ^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $color: 1 is not a color.\ \n ,\ \n1 | a {b: desaturate(1, 2)}\ \n | ^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } #[test] + #[ignore] // wrong error fn lightness() { assert_eq!( - runner().err("a {b: desaturate(plum, blue)}\n"), - "Error: $amount: blue is not a number.\ + runner().err( + "a {b: desaturate(plum, blue)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: desaturate(plum, blue)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: blue is not a number.\ \n ,\ \n1 | a {b: desaturate(plum, blue)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } } } diff --git a/rsass/tests/spec/core_functions/color/fade_in.rs b/rsass/tests/spec/core_functions/color/fade_in.rs index 95d97aa6d..1e9c032ac 100644 --- a/rsass/tests/spec/core_functions/color/fade_in.rs +++ b/rsass/tests/spec/core_functions/color/fade_in.rs @@ -14,30 +14,53 @@ mod error { use super::runner; #[test] + #[ignore] // wrong error fn too_high() { assert_eq!( - runner().err("a {b: fade-in(red, 1.001)}\n"), - "Error: $amount: Expected 1.001 to be within 0 and 1.\ + runner().err( + "a {b: fade-in(red, 1.001)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: fade-in(red, 1.001)}\ + \n | ^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: Expected 1.001 to be within 0 and 1.\ \n ,\ \n1 | a {b: fade-in(red, 1.001)}\ \n | ^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } #[test] + #[ignore] // wrong error fn too_low() { assert_eq!( - runner().err("a {b: fade-in(red, -0.001)}\n"), - "Error: $amount: Expected -0.001 to be within 0 and 1.\ + runner().err( + "a {b: fade-in(red, -0.001)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: fade-in(red, -0.001)}\ + \n | ^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: Expected -0.001 to be within 0 and 1.\ \n ,\ \n1 | a {b: fade-in(red, -0.001)}\ \n | ^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } #[test] + #[ignore] // wrong error fn unit() { assert_eq!( runner().err( @@ -45,7 +68,15 @@ mod error { \n// fully forbidden (sass/sass#3374).\ \na {b: fade-in(red, 50%)}\n" ), - "Error: $amount: Expected 50% to be within 0 and 1.\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n3 | a {b: fade-in(red, 50%)}\ + \n | ^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 3:7 root stylesheet\n\ + \nError: $amount: Expected 50% to be within 0 and 1.\ \n ,\ \n3 | a {b: fade-in(red, 50%)}\ \n | ^^^^^^^^^^^^^^^^^\ @@ -61,7 +92,15 @@ mod error { runner().err( "a {b: fade-in(color(srgb 1 1 1 / 0.1), 0.1)}\n" ), - "Error: fade-in() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: fade-in(color(srgb 1 1 1 / 0.1), 0.1)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: fade-in() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.\ \n ,\ \n1 | a {b: fade-in(color(srgb 1 1 1 / 0.1), 0.1)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ @@ -106,28 +145,50 @@ mod error { use super::runner; #[test] + #[ignore] // wrong error fn alpha() { assert_eq!( - runner().err("a {b: fade-in(red, blue)}\n"), - "Error: $amount: blue is not a number.\ + runner().err( + "a {b: fade-in(red, blue)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: fade-in(red, blue)}\ + \n | ^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: blue is not a number.\ \n ,\ \n1 | a {b: fade-in(red, blue)}\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } #[test] + #[ignore] // wrong error fn color() { assert_eq!( - runner().err("a {b: fade-in(1, 0.1)}\n"), - "Error: $color: 1 is not a color.\ + runner().err( + "a {b: fade-in(1, 0.1)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: fade-in(1, 0.1)}\ + \n | ^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $color: 1 is not a color.\ \n ,\ \n1 | a {b: fade-in(1, 0.1)}\ \n | ^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } } } diff --git a/rsass/tests/spec/core_functions/color/fade_out.rs b/rsass/tests/spec/core_functions/color/fade_out.rs index b05bebe72..98dd10188 100644 --- a/rsass/tests/spec/core_functions/color/fade_out.rs +++ b/rsass/tests/spec/core_functions/color/fade_out.rs @@ -14,30 +14,53 @@ mod error { use super::runner; #[test] + #[ignore] // wrong error fn too_high() { assert_eq!( - runner().err("a {b: fade-out(red, 1.001)}\n"), - "Error: $amount: Expected 1.001 to be within 0 and 1.\ + runner().err( + "a {b: fade-out(red, 1.001)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: fade-out(red, 1.001)}\ + \n | ^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: Expected 1.001 to be within 0 and 1.\ \n ,\ \n1 | a {b: fade-out(red, 1.001)}\ \n | ^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } #[test] + #[ignore] // wrong error fn too_low() { assert_eq!( - runner().err("a {b: fade-out(red, -0.001)}\n"), - "Error: $amount: Expected -0.001 to be within 0 and 1.\ + runner().err( + "a {b: fade-out(red, -0.001)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: fade-out(red, -0.001)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: Expected -0.001 to be within 0 and 1.\ \n ,\ \n1 | a {b: fade-out(red, -0.001)}\ \n | ^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } #[test] + #[ignore] // wrong error fn unit() { assert_eq!( runner().err( @@ -45,7 +68,15 @@ mod error { \n// fully forbidden (sass/sass#3374).\ \na {b: fade-out(red, 50%)}\n" ), - "Error: $amount: Expected 50% to be within 0 and 1.\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n3 | a {b: fade-out(red, 50%)}\ + \n | ^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 3:7 root stylesheet\n\ + \nError: $amount: Expected 50% to be within 0 and 1.\ \n ,\ \n3 | a {b: fade-out(red, 50%)}\ \n | ^^^^^^^^^^^^^^^^^^\ @@ -61,7 +92,15 @@ mod error { runner().err( "a {b: fade-out(color(srgb 1 1 1), 0.1)}\n" ), - "Error: fade-out() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: fade-out(color(srgb 1 1 1), 0.1)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: fade-out() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.\ \n ,\ \n1 | a {b: fade-out(color(srgb 1 1 1), 0.1)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ @@ -106,28 +145,50 @@ mod error { use super::runner; #[test] + #[ignore] // wrong error fn alpha() { assert_eq!( - runner().err("a {b: fade-out(red, blue)}\n"), - "Error: $amount: blue is not a number.\ + runner().err( + "a {b: fade-out(red, blue)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: fade-out(red, blue)}\ + \n | ^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: blue is not a number.\ \n ,\ \n1 | a {b: fade-out(red, blue)}\ \n | ^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } #[test] + #[ignore] // wrong error fn color() { assert_eq!( - runner().err("a {b: fade-out(1, 0.1)}\n"), - "Error: $color: 1 is not a color.\ + runner().err( + "a {b: fade-out(1, 0.1)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: fade-out(1, 0.1)}\ + \n | ^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $color: 1 is not a color.\ \n ,\ \n1 | a {b: fade-out(1, 0.1)}\ \n | ^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } } } diff --git a/rsass/tests/spec/core_functions/color/invert/error.rs b/rsass/tests/spec/core_functions/color/invert/error.rs index 73501cdb0..5565f3a73 100644 --- a/rsass/tests/spec/core_functions/color/invert/error.rs +++ b/rsass/tests/spec/core_functions/color/invert/error.rs @@ -63,16 +63,27 @@ mod global { use super::runner; #[test] + #[ignore] // wrong error fn color() { assert_eq!( - runner().err("a {b: invert(c)}\n"), - "Error: $color: c is not a color.\ + runner().err( + "a {b: invert(c)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.invert instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: invert(c)}\ + \n | ^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $color: c is not a color.\ \n ,\ \n1 | a {b: invert(c)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } } } @@ -91,7 +102,15 @@ mod missing { runner().err( "a {b: invert(rgb(10 none 20), $space: xyz)}\n" ), - "Error: $y: Because the CSS working group is still deciding on the best behavior, Sass doesn\'t currently support modifying missing channels (color: color(xyz 0.0025142545 none 0.0067080366)).\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.invert instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: invert(rgb(10 none 20), $space: xyz)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $y: Because the CSS working group is still deciding on the best behavior, Sass doesn\'t currently support modifying missing channels (color: color(xyz 0.0025142545 none 0.0067080366)).\ \n ,\ \n1 | a {b: invert(rgb(10 none 20), $space: xyz)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ @@ -106,7 +125,15 @@ mod missing { runner().err( "a {b: invert(grey, $space: hsl)}\n" ), - "Error: $hue: Because the CSS working group is still deciding on the best behavior, Sass doesn\'t currently support modifying missing channels (color: hsl(none 0% 50.1960784314%)).\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.invert instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: invert(grey, $space: hsl)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $hue: Because the CSS working group is still deciding on the best behavior, Sass doesn\'t currently support modifying missing channels (color: hsl(none 0% 50.1960784314%)).\ \n ,\ \n1 | a {b: invert(grey, $space: hsl)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^\ @@ -125,7 +152,15 @@ mod missing { runner().err( "a {b: invert(hsl(0 40% none), $space: hsl)}\n" ), - "Error: $lightness: Because the CSS working group is still deciding on the best behavior, Sass doesn\'t currently support modifying missing channels (color: hsl(0deg 40% none)).\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.invert instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: invert(hsl(0 40% none), $space: hsl)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $lightness: Because the CSS working group is still deciding on the best behavior, Sass doesn\'t currently support modifying missing channels (color: hsl(0deg 40% none)).\ \n ,\ \n1 | a {b: invert(hsl(0 40% none), $space: hsl)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ @@ -140,7 +175,15 @@ mod missing { runner().err( "a {b: invert(hwb(none 10% 20%), $space: hwb)}\n" ), - "Error: $hue: Because the CSS working group is still deciding on the best behavior, Sass doesn\'t currently support modifying missing channels (color: hwb(none 10% 20%)).\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.invert instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: invert(hwb(none 10% 20%), $space: hwb)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $hue: Because the CSS working group is still deciding on the best behavior, Sass doesn\'t currently support modifying missing channels (color: hwb(none 10% 20%)).\ \n ,\ \n1 | a {b: invert(hwb(none 10% 20%), $space: hwb)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ @@ -155,7 +198,15 @@ mod missing { runner().err( "a {b: invert(rgb(none 10 20))}\n" ), - "Error: $red: Because the CSS working group is still deciding on the best behavior, Sass doesn\'t currently support modifying missing channels (color: rgb(none 10 20)).\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.invert instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: invert(rgb(none 10 20))}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $red: Because the CSS working group is still deciding on the best behavior, Sass doesn\'t currently support modifying missing channels (color: rgb(none 10 20)).\ \n ,\ \n1 | a {b: invert(rgb(none 10 20))}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^\ @@ -176,7 +227,15 @@ mod missing { runner().err( "a {b: invert(color(rec2020 0.1 none 0.2), $space: xyz)}\n" ), - "Error: $y: Because the CSS working group is still deciding on the best behavior, Sass doesn\'t currently support modifying missing channels (color: color(xyz 0.0237000113 none 0.0589013339)).\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.invert instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: invert(color(rec2020 0.1 none 0.2), $space: xyz)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $y: Because the CSS working group is still deciding on the best behavior, Sass doesn\'t currently support modifying missing channels (color: color(xyz 0.0237000113 none 0.0589013339)).\ \n ,\ \n1 | a {b: invert(color(rec2020 0.1 none 0.2), $space: xyz)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ @@ -191,7 +250,15 @@ mod missing { runner().err( "a {b: invert(color(rec2020 0.4 0.4 0.4), $space: lch)}\n" ), - "Error: $hue: Because the CSS working group is still deciding on the best behavior, Sass doesn\'t currently support modifying missing channels (color: lch(48.649404846% 0 none)).\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.invert instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: invert(color(rec2020 0.4 0.4 0.4), $space: lch)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $hue: Because the CSS working group is still deciding on the best behavior, Sass doesn\'t currently support modifying missing channels (color: lch(48.649404846% 0 none)).\ \n ,\ \n1 | a {b: invert(color(rec2020 0.4 0.4 0.4), $space: lch)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ @@ -206,7 +273,15 @@ mod missing { runner().err( "a {b: invert(color(srgb none 0.1 0.2), $space: srgb)}\n" ), - "Error: $red: Because the CSS working group is still deciding on the best behavior, Sass doesn\'t currently support modifying missing channels (color: color(srgb none 0.1 0.2)).\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.invert instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: invert(color(srgb none 0.1 0.2), $space: srgb)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $red: Because the CSS working group is still deciding on the best behavior, Sass doesn\'t currently support modifying missing channels (color: color(srgb none 0.1 0.2)).\ \n ,\ \n1 | a {b: invert(color(srgb none 0.1 0.2), $space: srgb)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ diff --git a/rsass/tests/spec/core_functions/color/lab/special_functions/alpha.rs b/rsass/tests/spec/core_functions/color/lab/special_functions/alpha.rs index 15cd17ac7..8951dde1b 100644 --- a/rsass/tests/spec/core_functions/color/lab/special_functions/alpha.rs +++ b/rsass/tests/spec/core_functions/color/lab/special_functions/alpha.rs @@ -83,8 +83,9 @@ mod calc { fn arg_1() { assert_eq!( runner().ok( - "@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(unquote(\"calc(1%)\") 2 3 / 0.4));\n" + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(string.unquote(\"calc(1%)\") 2 3 / 0.4));\n" ), "a {\ \n value: lab(calc(1%) 2 3/0.4);\ @@ -97,8 +98,9 @@ mod calc { fn arg_2() { assert_eq!( runner().ok( - "@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(1% unquote(\"calc(2)\") 3 / 0.4));\n" + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(1% string.unquote(\"calc(2)\") 3 / 0.4));\n" ), "a {\ \n value: lab(1% calc(2) 3/0.4);\ @@ -111,8 +113,9 @@ mod calc { fn arg_3() { assert_eq!( runner().ok( - "@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(1% 2 unquote(\"calc(3)\") / 0.4));\n" + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(1% 2 string.unquote(\"calc(3)\") / 0.4));\n" ), "a {\ \n value: lab(1% 2 calc(3)/0.4);\ @@ -125,8 +128,9 @@ mod calc { fn arg_4() { assert_eq!( runner().ok( - "@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(1% 2 3 / unquote(\"calc(0.4)\")));\n" + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(1% 2 3 / string.unquote(\"calc(0.4)\")));\n" ), "a {\ \n value: lab(1% 2 3/calc(0.4));\ @@ -149,8 +153,9 @@ mod clamp { fn arg_1() { assert_eq!( runner().ok( - "@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(unquote(\"clamp(1%, 2, 3)\") 2 3 / 0.4));\n" + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(string.unquote(\"clamp(1%, 2, 3)\") 2 3 / 0.4));\n" ), "a {\ \n value: lab(clamp(1%, 2, 3) 2 3/0.4);\ @@ -163,8 +168,9 @@ mod clamp { fn arg_2() { assert_eq!( runner().ok( - "@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(1% unquote(\"clamp(2, 3, 4)\") 3 / 0.4));\n" + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(1% string.unquote(\"clamp(2, 3, 4)\") 3 / 0.4));\n" ), "a {\ \n value: lab(1% clamp(2, 3, 4) 3/0.4);\ @@ -177,8 +183,9 @@ mod clamp { fn arg_3() { assert_eq!( runner().ok( - "@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(1% 2 unquote(\"clamp(3, 4, 5)\") / 0.4));\n" + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(1% 2 string.unquote(\"clamp(3, 4, 5)\") / 0.4));\n" ), "a {\ \n value: lab(1% 2 clamp(3, 4, 5)/0.4);\ @@ -191,8 +198,9 @@ mod clamp { fn arg_4() { assert_eq!( runner().ok( - "@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(1% 2 3 / unquote(\"clamp(0.4, 0.5, 0.6)\")));\n" + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(1% 2 3 / string.unquote(\"clamp(0.4, 0.5, 0.6)\")));\n" ), "a {\ \n value: lab(1% 2 3/clamp(0.4, 0.5, 0.6));\ @@ -268,8 +276,9 @@ mod max { fn arg_1() { assert_eq!( runner().ok( - "@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(unquote(\"max(1%)\") 2 3 / 0.4));\n" + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(string.unquote(\"max(1%)\") 2 3 / 0.4));\n" ), "a {\ \n value: lab(max(1%) 2 3/0.4);\ @@ -282,8 +291,9 @@ mod max { fn arg_2() { assert_eq!( runner().ok( - "@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(1% unquote(\"max(2)\") 3 / 0.4));\n" + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(1% string.unquote(\"max(2)\") 3 / 0.4));\n" ), "a {\ \n value: lab(1% max(2) 3/0.4);\ @@ -296,8 +306,9 @@ mod max { fn arg_3() { assert_eq!( runner().ok( - "@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(1% 2 unquote(\"max(3)\") / 0.4));\n" + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(1% 2 string.unquote(\"max(3)\") / 0.4));\n" ), "a {\ \n value: lab(1% 2 max(3)/0.4);\ @@ -310,8 +321,9 @@ mod max { fn arg_4() { assert_eq!( runner().ok( - "@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(1% 2 3 / unquote(\"max(0.4)\")));\n" + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(1% 2 3 / string.unquote(\"max(0.4)\")));\n" ), "a {\ \n value: lab(1% 2 3/max(0.4));\ @@ -334,8 +346,9 @@ mod min { fn arg_1() { assert_eq!( runner().ok( - "@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(unquote(\"min(1%)\") 2 3 / 0.4));\n" + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(string.unquote(\"min(1%)\") 2 3 / 0.4));\n" ), "a {\ \n value: lab(min(1%) 2 3/0.4);\ @@ -348,8 +361,9 @@ mod min { fn arg_2() { assert_eq!( runner().ok( - "@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(1% unquote(\"min(2)\") 3 / 0.4));\n" + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(1% string.unquote(\"min(2)\") 3 / 0.4));\n" ), "a {\ \n value: lab(1% min(2) 3/0.4);\ @@ -362,8 +376,9 @@ mod min { fn arg_3() { assert_eq!( runner().ok( - "@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(1% 2 unquote(\"min(3)\") / 0.4));\n" + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(1% 2 string.unquote(\"min(3)\") / 0.4));\n" ), "a {\ \n value: lab(1% 2 min(3)/0.4);\ @@ -376,8 +391,9 @@ mod min { fn arg_4() { assert_eq!( runner().ok( - "@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(1% 2 3 / unquote(\"min(0.4)\")));\n" + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(1% 2 3 / string.unquote(\"min(0.4)\")));\n" ), "a {\ \n value: lab(1% 2 3/min(0.4));\ diff --git a/rsass/tests/spec/core_functions/color/lab/special_functions/no_alpha.rs b/rsass/tests/spec/core_functions/color/lab/special_functions/no_alpha.rs index 7b233bad4..0df866394 100644 --- a/rsass/tests/spec/core_functions/color/lab/special_functions/no_alpha.rs +++ b/rsass/tests/spec/core_functions/color/lab/special_functions/no_alpha.rs @@ -58,37 +58,46 @@ mod calc { #[ignore] // unexepected error fn arg_1() { assert_eq!( - runner().ok("@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(unquote(\"calc(1%)\") 2 3));\n"), - "a {\ + runner().ok( + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(string.unquote(\"calc(1%)\") 2 3));\n" + ), + "a {\ \n value: lab(calc(1%) 2 3);\ \n type: string;\ \n}\n" - ); + ); } #[test] #[ignore] // unexepected error fn arg_2() { assert_eq!( - runner().ok("@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(1% unquote(\"calc(2)\") 3));\n"), - "a {\ + runner().ok( + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(1% string.unquote(\"calc(2)\") 3));\n" + ), + "a {\ \n value: lab(1% calc(2) 3);\ \n type: string;\ \n}\n" - ); + ); } #[test] #[ignore] // unexepected error fn arg_3() { assert_eq!( - runner().ok("@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(1% 2 unquote(\"calc(3)\")));\n"), - "a {\ + runner().ok( + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(1% 2 string.unquote(\"calc(3)\")));\n" + ), + "a {\ \n value: lab(1% 2 calc(3));\ \n type: string;\ \n}\n" - ); + ); } } } @@ -105,8 +114,9 @@ mod clamp { fn arg_1() { assert_eq!( runner().ok( - "@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(unquote(\"clamp(1%, 2, 3)\") 2 3));\n" + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(string.unquote(\"clamp(1%, 2, 3)\") 2 3));\n" ), "a {\ \n value: lab(clamp(1%, 2, 3) 2 3);\ @@ -119,8 +129,9 @@ mod clamp { fn arg_2() { assert_eq!( runner().ok( - "@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(1% unquote(\"clamp(2, 3, 4)\") 3));\n" + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(1% string.unquote(\"clamp(2, 3, 4)\") 3));\n" ), "a {\ \n value: lab(1% clamp(2, 3, 4) 3);\ @@ -133,8 +144,9 @@ mod clamp { fn arg_3() { assert_eq!( runner().ok( - "@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(1% 2 unquote(\"clamp(3, 4, 5)\")));\n" + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(1% 2 string.unquote(\"clamp(3, 4, 5)\")));\n" ), "a {\ \n value: lab(1% 2 clamp(3, 4, 5));\ @@ -197,37 +209,46 @@ mod max { #[ignore] // unexepected error fn arg_1() { assert_eq!( - runner().ok("@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(unquote(\"max(1%)\") 2 3));\n"), - "a {\ + runner().ok( + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(string.unquote(\"max(1%)\") 2 3));\n" + ), + "a {\ \n value: lab(max(1%) 2 3);\ \n type: string;\ \n}\n" - ); + ); } #[test] #[ignore] // unexepected error fn arg_2() { assert_eq!( - runner().ok("@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(1% unquote(\"max(2)\") 3));\n"), - "a {\ + runner().ok( + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(1% string.unquote(\"max(2)\") 3));\n" + ), + "a {\ \n value: lab(1% max(2) 3);\ \n type: string;\ \n}\n" - ); + ); } #[test] #[ignore] // unexepected error fn arg_3() { assert_eq!( - runner().ok("@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(1% 2 unquote(\"max(3)\")));\n"), - "a {\ + runner().ok( + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(1% 2 string.unquote(\"max(3)\")));\n" + ), + "a {\ \n value: lab(1% 2 max(3));\ \n type: string;\ \n}\n" - ); + ); } } } @@ -243,37 +264,46 @@ mod min { #[ignore] // unexepected error fn arg_1() { assert_eq!( - runner().ok("@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(unquote(\"min(1%)\") 2 3));\n"), - "a {\ + runner().ok( + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(string.unquote(\"min(1%)\") 2 3));\n" + ), + "a {\ \n value: lab(min(1%) 2 3);\ \n type: string;\ \n}\n" - ); + ); } #[test] #[ignore] // unexepected error fn arg_2() { assert_eq!( - runner().ok("@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(1% unquote(\"min(2)\") 3));\n"), - "a {\ + runner().ok( + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(1% string.unquote(\"min(2)\") 3));\n" + ), + "a {\ \n value: lab(1% min(2) 3);\ \n type: string;\ \n}\n" - ); + ); } #[test] #[ignore] // unexepected error fn arg_3() { assert_eq!( - runner().ok("@use \'core_functions/color/utils\';\ - \n@include utils.inspect(lab(1% 2 unquote(\"min(3)\")));\n"), - "a {\ + runner().ok( + "@use \"sass:string\";\ + \n@use \'core_functions/color/utils\';\ + \n@include utils.inspect(lab(1% 2 string.unquote(\"min(3)\")));\n" + ), + "a {\ \n value: lab(1% 2 min(3));\ \n type: string;\ \n}\n" - ); + ); } } } diff --git a/rsass/tests/spec/core_functions/color/lighten.rs b/rsass/tests/spec/core_functions/color/lighten.rs index 112f9c8a0..7db724d5e 100644 --- a/rsass/tests/spec/core_functions/color/lighten.rs +++ b/rsass/tests/spec/core_functions/color/lighten.rs @@ -23,28 +23,50 @@ mod error { use super::runner; #[test] + #[ignore] // wrong error fn too_high() { assert_eq!( - runner().err("a {b: lighten(red, 100.001)}\n"), - "Error: $amount: Expected 100.001 to be within 0 and 100.\ + runner().err( + "a {b: lighten(red, 100.001)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: lighten(red, 100.001)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: Expected 100.001 to be within 0 and 100.\ \n ,\ \n1 | a {b: lighten(red, 100.001)}\ \n | ^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } #[test] + #[ignore] // wrong error fn too_low() { assert_eq!( - runner().err("a {b: lighten(red, -0.001)}\n"), - "Error: $amount: Expected -0.001 to be within 0 and 100.\ + runner().err( + "a {b: lighten(red, -0.001)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: lighten(red, -0.001)}\ + \n | ^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: Expected -0.001 to be within 0 and 100.\ \n ,\ \n1 | a {b: lighten(red, -0.001)}\ \n | ^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } } #[test] @@ -54,7 +76,15 @@ mod error { runner().err( "a {b: lighten(color(srgb 0 0 0), 10%)}\n" ), - "Error: lighten() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: lighten(color(srgb 0 0 0), 10%)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: lighten() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.\ \n ,\ \n1 | a {b: lighten(color(srgb 0 0 0), 10%)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ @@ -99,28 +129,50 @@ mod error { use super::runner; #[test] + #[ignore] // wrong error fn color() { assert_eq!( - runner().err("a {b: lighten(1, 2)}\n"), - "Error: $color: 1 is not a color.\ + runner().err( + "a {b: lighten(1, 2)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: lighten(1, 2)}\ + \n | ^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $color: 1 is not a color.\ \n ,\ \n1 | a {b: lighten(1, 2)}\ \n | ^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } #[test] + #[ignore] // wrong error fn lightness() { assert_eq!( - runner().err("a {b: lighten(red, blue)}\n"), - "Error: $amount: blue is not a number.\ + runner().err( + "a {b: lighten(red, blue)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: lighten(red, blue)}\ + \n | ^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: blue is not a number.\ \n ,\ \n1 | a {b: lighten(red, blue)}\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } } } diff --git a/rsass/tests/spec/core_functions/color/mix/alpha.rs b/rsass/tests/spec/core_functions/color/mix/alpha.rs index ffc4f322a..ef5b58c3f 100644 --- a/rsass/tests/spec/core_functions/color/mix/alpha.rs +++ b/rsass/tests/spec/core_functions/color/mix/alpha.rs @@ -8,7 +8,8 @@ fn runner() -> crate::TestRunner { #[test] fn even() { assert_eq!( - runner().ok("a {b: mix(rgba(#91e16f, 0.3), rgba(#0144bf, 0.3))}\n"), + runner().ok("@use \"sass:color\";\ + \na {b: color.mix(rgba(#91e16f, 0.3), rgba(#0144bf, 0.3))}\n"), "a {\ \n b: rgba(73, 146.5, 151, 0.3);\ \n}\n" @@ -17,7 +18,8 @@ fn even() { #[test] fn first() { assert_eq!( - runner().ok("a {b: mix(#91e16f, transparent)}\n"), + runner().ok("@use \"sass:color\";\ + \na {b: color.mix(#91e16f, transparent)}\n"), "a {\ \n b: rgba(145, 225, 111, 0.5);\ \n}\n" @@ -26,7 +28,8 @@ fn first() { #[test] fn firstwards() { assert_eq!( - runner().ok("a {b: mix(rgba(#91e16f, 0.8), rgba(#0144bf, 0.3))}\n"), + runner().ok("@use \"sass:color\";\ + \na {b: color.mix(rgba(#91e16f, 0.8), rgba(#0144bf, 0.3))}\n"), "a {\ \n b: rgba(109, 185.75, 131, 0.55);\ \n}\n" @@ -35,7 +38,8 @@ fn firstwards() { #[test] fn last() { assert_eq!( - runner().ok("a {b: mix(transparent, #0144bf)}\n"), + runner().ok("@use \"sass:color\";\ + \na {b: color.mix(transparent, #0144bf)}\n"), "a {\ \n b: rgba(1, 68, 191, 0.5);\ \n}\n" @@ -44,7 +48,8 @@ fn last() { #[test] fn lastwards() { assert_eq!( - runner().ok("a {b: mix(rgba(#91e16f, 0.4), rgba(#0144bf, 0.9))}\n"), + runner().ok("@use \"sass:color\";\ + \na {b: color.mix(rgba(#91e16f, 0.4), rgba(#0144bf, 0.9))}\n"), "a {\ \n b: rgba(37, 107.25, 171, 0.65);\ \n}\n" diff --git a/rsass/tests/spec/core_functions/color/mix/both_weights.rs b/rsass/tests/spec/core_functions/color/mix/both_weights.rs index 22951b5e4..82e45f0fa 100644 --- a/rsass/tests/spec/core_functions/color/mix/both_weights.rs +++ b/rsass/tests/spec/core_functions/color/mix/both_weights.rs @@ -9,10 +9,11 @@ fn runner() -> crate::TestRunner { fn contradiction() { assert_eq!( runner().ok( - "// When we weight entirely towards a transparent color, the formula for\ + "@use \"sass:color\";\ + \n// When we weight entirely towards a transparent color, the formula for\ \n// computing the combined alpha would divide by zero, so we just return\ \n// transparent as a special case.\ - \na {b: mix(transparent, #0144bf, 100%)}\n" + \na {b: color.mix(transparent, #0144bf, 100%)}\n" ), "a {\ \n b: rgba(0, 0, 0, 0);\ @@ -26,24 +27,26 @@ mod mixed { #[test] fn firstwards() { assert_eq!( - runner().ok( - "a {b: mix(rgba(#91e16f, 0.8), rgba(#0144bf, 0.3), 63%)}\n" - ), - "a {\ + runner().ok( + "@use \"sass:color\";\ + \na {b: color.mix(rgba(#91e16f, 0.8), rgba(#0144bf, 0.3), 63%)}\n" + ), + "a {\ \n b: rgba(121.4247787611, 199.296460177, 124.0973451327, 0.615);\ \n}\n" - ); + ); } #[test] fn lastwards() { assert_eq!( - runner().ok( - "a {b: mix(rgba(#91e16f, 0.2), rgba(#0144bf, 0.7), 42%)}\n" - ), - "a {\ + runner().ok( + "@use \"sass:color\";\ + \na {b: color.mix(rgba(#91e16f, 0.2), rgba(#0144bf, 0.7), 42%)}\n" + ), + "a {\ \n b: rgba(29, 98.5277777778, 175.4444444444, 0.49);\ \n}\n" - ); + ); } } mod transparent { @@ -53,7 +56,8 @@ mod transparent { #[test] fn first() { assert_eq!( - runner().ok("a {b: mix(transparent, #0144bf, 70%)}\n"), + runner().ok("@use \"sass:color\";\ + \na {b: color.mix(transparent, #0144bf, 70%)}\n"), "a {\ \n b: rgba(1, 68, 191, 0.3);\ \n}\n" @@ -62,7 +66,8 @@ mod transparent { #[test] fn last() { assert_eq!( - runner().ok("a {b: mix(#91e16f, transparent, 70%)}\n"), + runner().ok("@use \"sass:color\";\ + \na {b: color.mix(#91e16f, transparent, 70%)}\n"), "a {\ \n b: rgba(145, 225, 111, 0.7);\ \n}\n" @@ -76,23 +81,25 @@ mod weighted { #[test] fn first() { assert_eq!( - runner().ok( - "a {b: mix(rgba(#91e16f, 0.2), rgba(#0144bf, 0.7), 100%)}\n" - ), - "a {\ + runner().ok( + "@use \"sass:color\";\ + \na {b: color.mix(rgba(#91e16f, 0.2), rgba(#0144bf, 0.7), 100%)}\n" + ), + "a {\ \n b: rgba(145, 225, 111, 0.2);\ \n}\n" - ); + ); } #[test] fn last() { assert_eq!( - runner().ok( - "a {b: mix(rgba(#91e16f, 0.2), rgba(#0144bf, 0.7), 0%)}\n" - ), - "a {\ + runner().ok( + "@use \"sass:color\";\ + \na {b: color.mix(rgba(#91e16f, 0.2), rgba(#0144bf, 0.7), 0%)}\n" + ), + "a {\ \n b: rgba(1, 68, 191, 0.7);\ \n}\n" - ); + ); } } diff --git a/rsass/tests/spec/core_functions/color/mix/error.rs b/rsass/tests/spec/core_functions/color/mix/error.rs index 572c0839b..335171b49 100644 --- a/rsass/tests/spec/core_functions/color/mix/error.rs +++ b/rsass/tests/spec/core_functions/color/mix/error.rs @@ -10,36 +10,68 @@ mod bounds { use super::runner; #[test] + #[ignore] // wrong error fn too_high() { assert_eq!( - runner().err("a {b: mix(red, blue, 100.001%)}\n"), - "Error: $weight: Expected 100.001% to be within 0% and 100%.\ + runner().err( + "a {b: mix(red, blue, 100.001%)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.mix instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: mix(red, blue, 100.001%)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $weight: Expected 100.001% to be within 0% and 100%.\ \n ,\ \n1 | a {b: mix(red, blue, 100.001%)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } #[test] + #[ignore] // wrong error fn too_low() { assert_eq!( - runner().err("a {b: mix(red, blue, -0.001%)}\n"), - "Error: $weight: Expected -0.001% to be within 0% and 100%.\ + runner().err( + "a {b: mix(red, blue, -0.001%)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.mix instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: mix(red, blue, -0.001%)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $weight: Expected -0.001% to be within 0% and 100%.\ \n ,\ \n1 | a {b: mix(red, blue, -0.001%)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } } #[test] #[ignore] // wrong error fn color_interpolation_method() { assert_eq!( - runner().err("a {b: mix(red, blue, $method: brighter)}\n"), - "Error: $method: Unknown color space \"brighter\".\ + runner().err( + "a {b: mix(red, blue, $method: brighter)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.mix instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: mix(red, blue, $method: brighter)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $method: Unknown color space \"brighter\".\ \n ,\ \n1 | a {b: mix(red, blue, $method: brighter)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ @@ -81,14 +113,24 @@ mod interpolation { #[ignore] // wrong error fn number() { assert_eq!( - runner().err("a {b: mix(red, blue, $method: hsl 1)}\n"), - "Error: $method: 1 is not a string.\ + runner().err( + "a {b: mix(red, blue, $method: hsl 1)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.mix instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: mix(red, blue, $method: hsl 1)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $method: 1 is not a string.\ \n ,\ \n1 | a {b: mix(red, blue, $method: hsl 1)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } } mod interpolation_list { @@ -102,7 +144,15 @@ mod interpolation_list { runner().err( "a {b: mix(red, blue, $method: \"hsl longer hue\")}\n" ), - "Error: $method: Expected \"hsl longer hue\" to be an unquoted string.\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.mix instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: mix(red, blue, $method: \"hsl longer hue\")}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $method: Expected \"hsl longer hue\" to be an unquoted string.\ \n ,\ \n1 | a {b: mix(red, blue, $method: \"hsl longer hue\")}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ @@ -127,14 +177,24 @@ mod interpolation_list { #[ignore] // wrong error fn slash() { assert_eq!( - runner().err("a {b: mix(red, blue, $method: hsl/longer/hue)}\n"), - "Error: $method: Unknown color space \"hsl/longer/hue\".\ + runner().err( + "a {b: mix(red, blue, $method: hsl/longer/hue)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.mix instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: mix(red, blue, $method: hsl/longer/hue)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $method: Unknown color space \"hsl/longer/hue\".\ \n ,\ \n1 | a {b: mix(red, blue, $method: hsl/longer/hue)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } } mod invalid_method { @@ -150,7 +210,15 @@ mod invalid_method { \n// dropped because it required implementations to lazily normalize hues.\ \na {b: mix(red, blue, $method: hsl specified hue)}\n" ), - "Error: $method: Unknown hue interpolation method specified.\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.mix instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n3 | a {b: mix(red, blue, $method: hsl specified hue)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 3:7 root stylesheet\n\ + \nError: $method: Unknown hue interpolation method specified.\ \n ,\ \n3 | a {b: mix(red, blue, $method: hsl specified hue)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ @@ -165,7 +233,15 @@ mod invalid_method { runner().err( "a {b: mix(red, blue, $method: hsl longer shade)}\n" ), - "Error: $method: Expected unquoted string \"hue\" at the end of (hsl longer shade), was shade.\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.mix instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: mix(red, blue, $method: hsl longer shade)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $method: Expected unquoted string \"hue\" at the end of (hsl longer shade), was shade.\ \n ,\ \n1 | a {b: mix(red, blue, $method: hsl longer shade)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ @@ -181,7 +257,15 @@ fn missing_hue_string() { runner().err( "a {b: mix(red, blue, $method: lch decreasing)}\n" ), - "Error: $method: Expected unquoted string \"hue\" after (lch decreasing).\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.mix instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: mix(red, blue, $method: lch decreasing)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $method: Expected unquoted string \"hue\" after (lch decreasing).\ \n ,\ \n1 | a {b: mix(red, blue, $method: lch decreasing)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ @@ -204,7 +288,15 @@ mod null_method { runner().err( "a {b: mix(lch(20% -20 0), red)}\n" ), - "Error: $color1: To use color.mix() with non-legacy color lch(20% 0 0deg), you must provide a $method.\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.mix instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: mix(lch(20% -20 0), red)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $color1: To use color.mix() with non-legacy color lch(20% 0 0deg), you must provide a $method.\ \n ,\ \n1 | a {b: mix(lch(20% -20 0), red)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^\ @@ -219,7 +311,15 @@ mod null_method { runner().err( "a {b: mix(red, lch(20% -20 0))}\n" ), - "Error: $color2: To use color.mix() with non-legacy color lch(20% 0 0deg), you must provide a $method.\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.mix instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: mix(red, lch(20% -20 0))}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $color2: To use color.mix() with non-legacy color lch(20% 0 0deg), you must provide a $method.\ \n ,\ \n1 | a {b: mix(red, lch(20% -20 0))}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^\ @@ -233,9 +333,18 @@ mod null_method { #[ignore] // wrong error fn parentheses() { assert_eq!( - runner() - .err("a {b: mix(red, blue, $method: lch (decreasing hue))}\n"), - "Error: $method: (decreasing hue) is not a string.\ + runner().err( + "a {b: mix(red, blue, $method: lch (decreasing hue))}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.mix instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: mix(red, blue, $method: lch (decreasing hue))}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $method: (decreasing hue) is not a string.\ \n ,\ \n1 | a {b: mix(red, blue, $method: lch (decreasing hue))}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ @@ -250,7 +359,15 @@ fn rectangular_space_with_method() { runner().err( "a {b: mix(red, blue, $method: srgb longer hue)}\n" ), - "Error: $method: Hue interpolation method \"HueInterpolationMethod.longer hue\" may not be set for rectangular color space srgb.\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.mix instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: mix(red, blue, $method: srgb longer hue)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $method: Hue interpolation method \"HueInterpolationMethod.longer hue\" may not be set for rectangular color space srgb.\ \n ,\ \n1 | a {b: mix(red, blue, $method: srgb longer hue)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ @@ -301,48 +418,91 @@ mod test_type { use super::runner; #[test] + #[ignore] // wrong error fn color1() { assert_eq!( - runner().err("a {b: mix(1, blue)}\n"), - "Error: $color1: 1 is not a color.\ + runner().err( + "a {b: mix(1, blue)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.mix instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: mix(1, blue)}\ + \n | ^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $color1: 1 is not a color.\ \n ,\ \n1 | a {b: mix(1, blue)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } #[test] + #[ignore] // wrong error fn color2() { assert_eq!( - runner().err("a {b: mix(red, 1)}\n"), - "Error: $color2: 1 is not a color.\ + runner().err( + "a {b: mix(red, 1)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.mix instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: mix(red, 1)}\ + \n | ^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $color2: 1 is not a color.\ \n ,\ \n1 | a {b: mix(red, 1)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } #[test] + #[ignore] // wrong error fn weight() { assert_eq!( - runner().err("a {b: mix(red, blue, green)}\n"), - "Error: $weight: green is not a number.\ + runner().err( + "a {b: mix(red, blue, green)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.mix instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: mix(red, blue, green)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $weight: green is not a number.\ \n ,\ \n1 | a {b: mix(red, blue, green)}\ \n | ^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } } #[test] #[ignore] // wrong error fn unknown_interpolation() { assert_eq!( - runner().err("a {b: mix(red, blue, $method: lch longerhue)}\n"), - "Error: $method: Unknown hue interpolation method longerhue.\ + runner().err( + "a {b: mix(red, blue, $method: lch longerhue)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.mix instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: mix(red, blue, $method: lch longerhue)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $method: Unknown hue interpolation method longerhue.\ \n ,\ \n1 | a {b: mix(red, blue, $method: lch longerhue)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ diff --git a/rsass/tests/spec/core_functions/color/mix/explicit_method.rs b/rsass/tests/spec/core_functions/color/mix/explicit_method.rs index c194816ea..f10c913fb 100644 --- a/rsass/tests/spec/core_functions/color/mix/explicit_method.rs +++ b/rsass/tests/spec/core_functions/color/mix/explicit_method.rs @@ -10,7 +10,8 @@ fn runner() -> crate::TestRunner { fn non_srgb() { assert_eq!( runner().ok( - "a {b: mix(lab(54.3 80.8 69.9), lch(46.3 68 134), $method: oklch)}\n" + "@use \"sass:color\";\ + \na {b: color.mix(lab(54.3 80.8 69.9), lch(46.3 68 134), $method: oklch)}\n" ), "a {\ \n b: lab(50.3820988862% 23.7394813109 159.7498356926);\ @@ -22,9 +23,10 @@ fn non_srgb() { fn previously_invalid() { assert_eq!( runner().ok( - "// An earlier draft of CSS Colors 4 didn\'t allow some spaces because they were\ + "@use \"sass:color\";\ + \n// An earlier draft of CSS Colors 4 didn\'t allow some spaces because they were\ \n// redundant with others, but they should be allowed now.\ - \na {b: mix(lab(54.3 80.8 69.9), lch(46.3 68 134), $method: display-p3)}\n" + \na {b: color.mix(lab(54.3 80.8 69.9), lch(46.3 68 134), $method: display-p3)}\n" ), "a {\ \n b: lab(43.9078099681% 26.0060363023 48.9943374049);\ @@ -35,7 +37,8 @@ fn previously_invalid() { #[ignore] // unexepected error fn srgb() { assert_eq!( - runner().ok("a {b: mix(red, green, $method: xyz)}\n"), + runner().ok("@use \"sass:color\";\ + \na {b: color.mix(red, green, $method: xyz)}\n"), "a {\ \n b: rgb(187.5160306784, 92.3735312967, 0);\ \n}\n" @@ -46,7 +49,8 @@ fn srgb() { fn weighted() { assert_eq!( runner().ok( - "a {b: mix(lab(54.3 80.8 69.9), lch(46.3 68 134), 30%, oklch)}\n" + "@use \"sass:color\";\ + \na {b: color.mix(lab(54.3 80.8 69.9), lch(46.3 68 134), 30%, oklch)}\n" ), "a {\ \n b: lab(48.9468096831% -7.9262402391 131.5295999957);\ diff --git a/rsass/tests/spec/core_functions/color/mix/explicit_weight.rs b/rsass/tests/spec/core_functions/color/mix/explicit_weight.rs index f5bc1bf94..4d44cb3be 100644 --- a/rsass/tests/spec/core_functions/color/mix/explicit_weight.rs +++ b/rsass/tests/spec/core_functions/color/mix/explicit_weight.rs @@ -8,7 +8,8 @@ fn runner() -> crate::TestRunner { #[test] fn even() { assert_eq!( - runner().ok("a {b: mix(#91e16f, #0144bf, 50%)}\n"), + runner().ok("@use \"sass:color\";\ + \na {b: color.mix(#91e16f, #0144bf, 50%)}\n"), "a {\ \n b: rgb(73, 146.5, 151);\ \n}\n" @@ -17,7 +18,8 @@ fn even() { #[test] fn first() { assert_eq!( - runner().ok("a {b: mix(#91e16f, #0144bf, 100%)}\n"), + runner().ok("@use \"sass:color\";\ + \na {b: color.mix(#91e16f, #0144bf, 100%)}\n"), "a {\ \n b: #91e16f;\ \n}\n" @@ -26,7 +28,8 @@ fn first() { #[test] fn firstwards() { assert_eq!( - runner().ok("a {b: mix(#91e16f, #0144bf, 92%)}\n"), + runner().ok("@use \"sass:color\";\ + \na {b: color.mix(#91e16f, #0144bf, 92%)}\n"), "a {\ \n b: rgb(133.48, 212.44, 117.4);\ \n}\n" @@ -35,7 +38,8 @@ fn firstwards() { #[test] fn last() { assert_eq!( - runner().ok("a {b: mix(#91e16f, #0144bf, 0%)}\n"), + runner().ok("@use \"sass:color\";\ + \na {b: color.mix(#91e16f, #0144bf, 0%)}\n"), "a {\ \n b: #0144bf;\ \n}\n" @@ -44,7 +48,8 @@ fn last() { #[test] fn lastwards() { assert_eq!( - runner().ok("a {b: mix(#91e16f, #0144bf, 43%)}\n"), + runner().ok("@use \"sass:color\";\ + \na {b: color.mix(#91e16f, #0144bf, 43%)}\n"), "a {\ \n b: rgb(62.92, 135.51, 156.6);\ \n}\n" diff --git a/rsass/tests/spec/core_functions/color/mix/hue_interpolation.rs b/rsass/tests/spec/core_functions/color/mix/hue_interpolation.rs index ea3ed7723..b6275413a 100644 --- a/rsass/tests/spec/core_functions/color/mix/hue_interpolation.rs +++ b/rsass/tests/spec/core_functions/color/mix/hue_interpolation.rs @@ -10,7 +10,8 @@ fn runner() -> crate::TestRunner { fn case_insensitive() { assert_eq!( runner().ok( - "a {b: mix(oklch(0.5 0.1 30), oklch(0.5 0.1 190), $method: oKlCh LONger HUE)}\n" + "@use \"sass:color\";\ + \na {b: color.mix(oklch(0.5 0.1 30), oklch(0.5 0.1 190), $method: oKlCh LONger HUE)}\n" ), "a {\ \n b: oklch(50% 0.1 290deg);\ @@ -26,7 +27,8 @@ mod decreasing { fn acute() { assert_eq!( runner().ok( - "a {b: mix(oklch(0.5 0.1 30), oklch(0.5 0.1 190), $method: oklch decreasing hue)}\n" + "@use \"sass:color\";\ + \na {b: color.mix(oklch(0.5 0.1 30), oklch(0.5 0.1 190), $method: oklch decreasing hue)}\n" ), "a {\ \n b: oklch(50% 0.1 290deg);\ @@ -38,7 +40,8 @@ mod decreasing { fn obtuse() { assert_eq!( runner().ok( - "a {b: mix(oklch(0.5 0.1 30), oklch(0.5 0.1 230), $method: oklch decreasing hue)}\n" + "@use \"sass:color\";\ + \na {b: color.mix(oklch(0.5 0.1 30), oklch(0.5 0.1 230), $method: oklch decreasing hue)}\n" ), "a {\ \n b: oklch(50% 0.1 310deg);\ @@ -55,7 +58,8 @@ mod default { fn acute() { assert_eq!( runner().ok( - "a {b: mix(oklch(0.5 0.1 30), oklch(0.5 0.1 190), $method: oklch)}\n" + "@use \"sass:color\";\ + \na {b: color.mix(oklch(0.5 0.1 30), oklch(0.5 0.1 190), $method: oklch)}\n" ), "a {\ \n b: oklch(50% 0.1 110deg);\ @@ -67,7 +71,8 @@ mod default { fn obtuse() { assert_eq!( runner().ok( - "a {b: mix(oklch(0.5 0.1 30), oklch(0.5 0.1 230), $method: oklch)}\n" + "@use \"sass:color\";\ + \na {b: color.mix(oklch(0.5 0.1 30), oklch(0.5 0.1 230), $method: oklch)}\n" ), "a {\ \n b: oklch(50% 0.1 310deg);\ @@ -84,7 +89,8 @@ mod increasing { fn acute() { assert_eq!( runner().ok( - "a {b: mix(oklch(0.5 0.1 30), oklch(0.5 0.1 190), $method: oklch increasing hue)}\n" + "@use \"sass:color\";\ + \na {b: color.mix(oklch(0.5 0.1 30), oklch(0.5 0.1 190), $method: oklch increasing hue)}\n" ), "a {\ \n b: oklch(50% 0.1 110deg);\ @@ -96,7 +102,8 @@ mod increasing { fn obtuse() { assert_eq!( runner().ok( - "a {b: mix(oklch(0.5 0.1 30), oklch(0.5 0.1 230), $method: oklch increasing hue)}\n" + "@use \"sass:color\";\ + \na {b: color.mix(oklch(0.5 0.1 30), oklch(0.5 0.1 230), $method: oklch increasing hue)}\n" ), "a {\ \n b: oklch(50% 0.1 130deg);\ @@ -113,7 +120,8 @@ mod longer { fn obtuse() { assert_eq!( runner().ok( - "a {b: mix(oklch(0.5 0.1 30), oklch(0.5 0.1 230), $method: oklch longer hue)}\n" + "@use \"sass:color\";\ + \na {b: color.mix(oklch(0.5 0.1 30), oklch(0.5 0.1 230), $method: oklch longer hue)}\n" ), "a {\ \n b: oklch(50% 0.1 130deg);\ @@ -130,7 +138,8 @@ mod shorter { fn acute() { assert_eq!( runner().ok( - "a {b: mix(oklch(0.5 0.1 30), oklch(0.5 0.1 190), $method: oklch shorter hue)}\n" + "@use \"sass:color\";\ + \na {b: color.mix(oklch(0.5 0.1 30), oklch(0.5 0.1 190), $method: oklch shorter hue)}\n" ), "a {\ \n b: oklch(50% 0.1 110deg);\ @@ -142,7 +151,8 @@ mod shorter { fn obtuse() { assert_eq!( runner().ok( - "a {b: mix(oklch(0.5 0.1 30), oklch(0.5 0.1 230), $method: oklch shorter hue)}\n" + "@use \"sass:color\";\ + \na {b: color.mix(oklch(0.5 0.1 30), oklch(0.5 0.1 230), $method: oklch shorter hue)}\n" ), "a {\ \n b: oklch(50% 0.1 310deg);\ @@ -154,7 +164,8 @@ mod shorter { #[ignore] // unexepected error fn weighted() { assert_eq!( - runner().ok("a {b: mix(red, green, 20%, lch longer hue)}\n"), + runner().ok("@use \"sass:color\";\ + \na {b: color.mix(red, green, 20%, lch longer hue)}\n"), "a {\ \n b: rgb(201.9125152451, 62.5456438786, 25.0531427989);\ \n}\n" diff --git a/rsass/tests/spec/core_functions/color/mix/mixed_spaces.rs b/rsass/tests/spec/core_functions/color/mix/mixed_spaces.rs index 6855376f4..da5030ed8 100644 --- a/rsass/tests/spec/core_functions/color/mix/mixed_spaces.rs +++ b/rsass/tests/spec/core_functions/color/mix/mixed_spaces.rs @@ -9,7 +9,8 @@ fn runner() -> crate::TestRunner { #[ignore] // unexepected error fn test() { assert_eq!( - runner().ok("a {b: mix(hsl(0 100% 50%), green, $method: lch)}\n"), + runner().ok("@use \"sass:color\";\ + \na {b: color.mix(hsl(0 100% 50%), green, $method: lch)}\n"), "a {\ \n b: hsl(50.9351301875, 199.2813015981%, 19.0269267557%);\ \n}\n" diff --git a/rsass/tests/spec/core_functions/color/mix/named.rs b/rsass/tests/spec/core_functions/color/mix/named.rs index 8bcf41762..094a42135 100644 --- a/rsass/tests/spec/core_functions/color/mix/named.rs +++ b/rsass/tests/spec/core_functions/color/mix/named.rs @@ -10,7 +10,8 @@ fn runner() -> crate::TestRunner { fn polar_space() { assert_eq!( runner().ok( - "a {b: mix($color1: #91e16f, $color2: #0144bf, $weight: 92%, $method: hsl decreasing hue)}\n" + "@use \"sass:color\";\ + \na {b: color.mix($color1: #91e16f, $color2: #0144bf, $weight: 92%, $method: hsl decreasing hue)}\n" ), "a {\ \n b: rgb(177.749777646, 225.4953896552, 98.9846103448);\ @@ -22,7 +23,8 @@ fn polar_space() { fn rectangular_space() { assert_eq!( runner().ok( - "a {b: mix($color1: #91e16f, $color2: #0144bf, $weight: 92%, $method: lab)}\n" + "@use \"sass:color\";\ + \na {b: color.mix($color1: #91e16f, $color2: #0144bf, $weight: 92%, $method: lab)}\n" ), "a {\ \n b: rgb(141.3483384924, 211.5499489073, 120.4340844852);\ diff --git a/rsass/tests/spec/core_functions/color/mix/predefined.rs b/rsass/tests/spec/core_functions/color/mix/predefined.rs index cce06fafe..39cab7478 100644 --- a/rsass/tests/spec/core_functions/color/mix/predefined.rs +++ b/rsass/tests/spec/core_functions/color/mix/predefined.rs @@ -10,7 +10,8 @@ fn runner() -> crate::TestRunner { fn rgb() { assert_eq!( runner().ok( - "a {b: mix(color(display-p3 1 0 0), color(display-p3 0 1 0), 20%, oklch)}\n" + "@use \"sass:color\";\ + \na {b: color.mix(color(display-p3 1 0 0), color(display-p3 0 1 0), 20%, oklch)}\n" ), "a {\ \n b: color(display-p3 0.6684751748 0.8535262895 -0.4281892011);\ @@ -22,7 +23,8 @@ fn rgb() { fn rgb_explicit_method() { assert_eq!( runner().ok( - "a {b: mix(color(display-p3 1 0 0), color(display-p3 0 1 0), 60%, $method: hsl)}\n" + "@use \"sass:color\";\ + \na {b: color.mix(color(display-p3 1 0 0), color(display-p3 0 1 0), 60%, $method: hsl)}\n" ), "a {\ \n b: color(display-p3 1.0849635599 0.8595336595 -0.252822726);\ @@ -34,7 +36,8 @@ fn rgb_explicit_method() { fn xyz() { assert_eq!( runner().ok( - "a {b: mix(color(xyz 0.15 0.24 0), color(xyz 1 .2 0), 65%, lch)}\n" + "@use \"sass:color\";\ + \na {b: color.mix(color(xyz 0.15 0.24 0), color(xyz 1 .2 0), 65%, lch)}\n" ), "a {\ \n b: color(xyz 0.2607187352 0.230899759 -0.0359437687);\ @@ -46,7 +49,8 @@ fn xyz() { fn xyz_explicit_method() { assert_eq!( runner().ok( - "a {b: mix(color(xyz-d50 0.15 0.24 0), color(xyz-d65 1 .2 0), $method: hwb)}\n" + "@use \"sass:color\";\ + \na {b: color.mix(color(xyz-d50 0.15 0.24 0), color(xyz-d65 1 .2 0), $method: hwb)}\n" ), "a {\ \n b: color(xyz-d50 0.5250037958 0.2975068714 -0.1396614468);\ diff --git a/rsass/tests/spec/core_functions/color/mix/units.rs b/rsass/tests/spec/core_functions/color/mix/units.rs index c402c63b4..0ce34e95c 100644 --- a/rsass/tests/spec/core_functions/color/mix/units.rs +++ b/rsass/tests/spec/core_functions/color/mix/units.rs @@ -12,7 +12,8 @@ mod weight { #[test] fn unitless() { assert_eq!( - runner().ok("a {b: mix(#91e16f, #0144bf, 50)}\n"), + runner().ok("@use \"sass:color\";\ + \na {b: color.mix(#91e16f, #0144bf, 50)}\n"), "a {\ \n b: rgb(73, 146.5, 151);\ \n}\n" @@ -21,7 +22,8 @@ mod weight { #[test] fn unknown() { assert_eq!( - runner().ok("a {b: mix(#91e16f, #0144bf, 50px)}\n"), + runner().ok("@use \"sass:color\";\ + \na {b: color.mix(#91e16f, #0144bf, 50px)}\n"), "a {\ \n b: rgb(73, 146.5, 151);\ \n}\n" diff --git a/rsass/tests/spec/core_functions/color/mix/unweighted.rs b/rsass/tests/spec/core_functions/color/mix/unweighted.rs index 339eeee19..cf98b55e1 100644 --- a/rsass/tests/spec/core_functions/color/mix/unweighted.rs +++ b/rsass/tests/spec/core_functions/color/mix/unweighted.rs @@ -8,9 +8,9 @@ fn runner() -> crate::TestRunner { #[test] fn average() { assert_eq!( - runner() - .ok("// All channels should be averaged across the two colors.\ - \na {b: mix(#91e16f, #0144bf)}\n"), + runner().ok("@use \"sass:color\";\ + \n// All channels should be averaged across the two colors.\ + \na {b: color.mix(#91e16f, #0144bf)}\n"), "a {\ \n b: rgb(73, 146.5, 151);\ \n}\n" @@ -20,8 +20,9 @@ fn average() { fn identical() { assert_eq!( runner().ok( - "// If two channels have the same values, they should be the same in the output.\ - \na {b: mix(#123456, #123456)}\n" + "@use \"sass:color\";\ + \n// If two channels have the same values, they should be the same in the output.\ + \na {b: color.mix(#123456, #123456)}\n" ), "a {\ \n b: #123456;\ @@ -32,8 +33,9 @@ fn identical() { fn min_and_max() { assert_eq!( runner().ok( - "// Each channel becomes the average of 255 and 0, which is 128 = 0xAA.\ - \na {b: mix(#ff00ff, #00ff00)}\n" + "@use \"sass:color\";\ + \n// Each channel becomes the average of 255 and 0, which is 128 = 0xAA.\ + \na {b: color.mix(#ff00ff, #00ff00)}\n" ), "a {\ \n b: rgb(127.5, 127.5, 127.5);\ diff --git a/rsass/tests/spec/core_functions/color/saturate.rs b/rsass/tests/spec/core_functions/color/saturate.rs index 985ce4d7d..c216e35b6 100644 --- a/rsass/tests/spec/core_functions/color/saturate.rs +++ b/rsass/tests/spec/core_functions/color/saturate.rs @@ -86,7 +86,15 @@ mod error { runner().err( "a {b: saturate(color(srgb 1 1 1), 10%)}\n" ), - "Error: saturate() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: saturate(color(srgb 1 1 1), 10%)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: saturate() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.\ \n ,\ \n1 | a {b: saturate(color(srgb 1 1 1), 10%)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ @@ -152,12 +160,21 @@ mod error { use super::runner; #[test] + #[ignore] // wrong error fn too_high() { assert_eq!( runner().err( "a {b: saturate(plum, 100.001)}\n" ), - "Error: $amount: Expected 100.001 to be within 0 and 100.\ + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: saturate(plum, 100.001)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: Expected 100.001 to be within 0 and 100.\ \n ,\ \n1 | a {b: saturate(plum, 100.001)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^\ @@ -166,16 +183,27 @@ mod error { ); } #[test] + #[ignore] // wrong error fn too_low() { assert_eq!( - runner().err("a {b: saturate(plum, -0.001)}\n"), - "Error: $amount: Expected -0.001 to be within 0 and 100.\ + runner().err( + "a {b: saturate(plum, -0.001)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: saturate(plum, -0.001)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: Expected -0.001 to be within 0 and 100.\ \n ,\ \n1 | a {b: saturate(plum, -0.001)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } } mod test_type { @@ -183,28 +211,50 @@ mod error { use super::runner; #[test] + #[ignore] // wrong error fn color() { assert_eq!( - runner().err("a {b: saturate(1, 2)}\n"), - "Error: $color: 1 is not a color.\ + runner().err( + "a {b: saturate(1, 2)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: saturate(1, 2)}\ + \n | ^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $color: 1 is not a color.\ \n ,\ \n1 | a {b: saturate(1, 2)}\ \n | ^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } #[test] + #[ignore] // wrong error fn lightness() { assert_eq!( - runner().err("a {b: saturate(plum, blue)}\n"), - "Error: $amount: blue is not a number.\ + runner().err( + "a {b: saturate(plum, blue)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: saturate(plum, blue)}\ + \n | ^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: blue is not a number.\ \n ,\ \n1 | a {b: saturate(plum, blue)}\ \n | ^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } } } diff --git a/rsass/tests/spec/core_functions/global/color/error.rs b/rsass/tests/spec/core_functions/global/color/error.rs index d528d20fe..71d3d0c80 100644 --- a/rsass/tests/spec/core_functions/global/color/error.rs +++ b/rsass/tests/spec/core_functions/global/color/error.rs @@ -10,75 +10,141 @@ mod too_low { use super::runner; #[test] + #[ignore] // wrong error fn darken() { assert_eq!( - runner().err("a {b: darken(red, -0.001)}\n"), - "Error: $amount: Expected -0.001 to be within 0 and 100.\ + runner().err( + "a {b: darken(red, -0.001)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: darken(red, -0.001)}\ + \n | ^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: Expected -0.001 to be within 0 and 100.\ \n ,\ \n1 | a {b: darken(red, -0.001)}\ \n | ^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } #[test] + #[ignore] // wrong error fn desaturate() { assert_eq!( - runner().err("a {b: desaturate(red, -0.001)}\n"), - "Error: $amount: Expected -0.001 to be within 0 and 100.\ + runner().err( + "a {b: desaturate(red, -0.001)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: desaturate(red, -0.001)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: Expected -0.001 to be within 0 and 100.\ \n ,\ \n1 | a {b: desaturate(red, -0.001)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } #[test] + #[ignore] // wrong error fn fade_in() { assert_eq!( - runner().err("a {b: fade-in(red, -0.001)}\n"), - "Error: $amount: Expected -0.001 to be within 0 and 1.\ + runner().err( + "a {b: fade-in(red, -0.001)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: fade-in(red, -0.001)}\ + \n | ^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: Expected -0.001 to be within 0 and 1.\ \n ,\ \n1 | a {b: fade-in(red, -0.001)}\ \n | ^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } #[test] + #[ignore] // wrong error fn fade_out() { assert_eq!( - runner().err("a {b: fade-out(red, -0.001)}\n"), - "Error: $amount: Expected -0.001 to be within 0 and 1.\ + runner().err( + "a {b: fade-out(red, -0.001)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: fade-out(red, -0.001)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: Expected -0.001 to be within 0 and 1.\ \n ,\ \n1 | a {b: fade-out(red, -0.001)}\ \n | ^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } #[test] + #[ignore] // wrong error fn lighten() { assert_eq!( - runner().err("a {b: lighten(red, -0.001)}\n"), - "Error: $amount: Expected -0.001 to be within 0 and 100.\ + runner().err( + "a {b: lighten(red, -0.001)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: lighten(red, -0.001)}\ + \n | ^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: Expected -0.001 to be within 0 and 100.\ \n ,\ \n1 | a {b: lighten(red, -0.001)}\ \n | ^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } #[test] + #[ignore] // wrong error fn saturate() { assert_eq!( - runner().err("a {b: saturate(red, -0.001)}\n"), - "Error: $amount: Expected -0.001 to be within 0 and 100.\ + runner().err( + "a {b: saturate(red, -0.001)}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse color.adjust instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: saturate(red, -0.001)}\ + \n | ^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $amount: Expected -0.001 to be within 0 and 100.\ \n ,\ \n1 | a {b: saturate(red, -0.001)}\ \n | ^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } } diff --git a/rsass/tests/spec/core_functions/meta/get_function/same_module.rs b/rsass/tests/spec/core_functions/meta/get_function/same_module.rs index e55c64e5d..9147e02c7 100644 --- a/rsass/tests/spec/core_functions/meta/get_function/same_module.rs +++ b/rsass/tests/spec/core_functions/meta/get_function/same_module.rs @@ -100,6 +100,19 @@ fn through_import() { ); } #[test] +fn through_use() { + let runner = runner().with_cwd("through_use"); + assert_eq!( + runner.ok("@use \"sass:math\";\ + \n@use \"sass:meta\";\ + \n$round-fn: meta.get-function(round, $module: math);\n\ + \na {b: meta.call($round-fn, 0.6)}\n"), + "a {\ + \n b: 1;\ + \n}\n" + ); +} +#[test] fn user_defined() { let runner = runner().with_cwd("user_defined"); assert_eq!( diff --git a/rsass/tests/spec/css/comment.rs b/rsass/tests/spec/css/comment.rs index c16e2bc02..6f14d397a 100644 --- a/rsass/tests/spec/css/comment.rs +++ b/rsass/tests/spec/css/comment.rs @@ -5,6 +5,25 @@ fn runner() -> crate::TestRunner { super::runner().with_cwd("comment") } +mod block { + #[allow(unused)] + use super::runner; + + mod loud { + #[allow(unused)] + use super::runner; + + mod sass { + #[allow(unused)] + use super::runner; + + mod content_after_close { + #[allow(unused)] + use super::runner; + } + } + } +} mod converts_newlines { #[allow(unused)] use super::runner; @@ -77,6 +96,15 @@ mod error { #[allow(unused)] use super::runner; } + mod sass { + #[allow(unused)] + use super::runner; + + mod content_after_close { + #[allow(unused)] + use super::runner; + } + } mod unterminated { #[allow(unused)] use super::runner; diff --git a/rsass/tests/spec/css/plain/error/statement/style_rule.rs b/rsass/tests/spec/css/plain/error/statement/style_rule.rs index 5769c0f9f..7e8946916 100644 --- a/rsass/tests/spec/css/plain/error/statement/style_rule.rs +++ b/rsass/tests/spec/css/plain/error/statement/style_rule.rs @@ -108,7 +108,14 @@ mod leading_combinator { runner.err( "a {@import \"plain\"}\n" ), - "Error: Top-level leading combinators aren\'t allowed in plain CSS.\ + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {@import \"plain\"}\ + \n | ^^^^^^^\ + \n \'\ + \n input.scss 1:12 root stylesheet\n\ + \nError: Top-level leading combinators aren\'t allowed in plain CSS.\ \n ,\ \n1 | > b {c: d}\ \n | ^\ diff --git a/rsass/tests/spec/css/plain/import/in_css.rs b/rsass/tests/spec/css/plain/import/in_css.rs index 8a33e9337..e053288f3 100644 --- a/rsass/tests/spec/css/plain/import/in_css.rs +++ b/rsass/tests/spec/css/plain/import/in_css.rs @@ -4,13 +4,38 @@ fn runner() -> crate::TestRunner { super::runner() .with_cwd("in_css") - .mock_file("plain.css", "@import \"whatever\";\n") + .mock_file("string/plain.css", "@import \"whatever\";\n") + .mock_file("url/quoted/plain.css", "@import url(\"whatever\");\n") + .mock_file("url/unquoted/plain.css", "@import url(whatever);\n") } #[test] -fn test() { - assert_eq!( - runner().ok("@import \"plain\";\n"), - "@import \"whatever\";\n" - ); +fn string() { + let runner = runner().with_cwd("string"); + assert_eq!(runner.ok("@use \"plain\";\n"), "@import \"whatever\";\n"); +} +mod url { + #[allow(unused)] + fn runner() -> crate::TestRunner { + super::runner().with_cwd("url") + } + + #[test] + #[ignore] // unexepected error + fn quoted() { + let runner = runner().with_cwd("quoted"); + assert_eq!( + runner.ok("@use \"plain\";\n"), + "@import url(\"whatever\");\n" + ); + } + #[test] + #[ignore] // unexepected error + fn unquoted() { + let runner = runner().with_cwd("unquoted"); + assert_eq!( + runner.ok("@use \"plain\";\n"), + "@import url(whatever);\n" + ); + } } diff --git a/rsass/tests/spec/css/plain/import/partial_conflict.rs b/rsass/tests/spec/css/plain/import/partial_conflict.rs index b01bae6da..d2df2a598 100644 --- a/rsass/tests/spec/css/plain/import/partial_conflict.rs +++ b/rsass/tests/spec/css/plain/import/partial_conflict.rs @@ -12,8 +12,17 @@ fn runner() -> crate::TestRunner { #[ignore] // missing error fn test() { assert_eq!( - runner().err("@import \"plain\";\n"), - "Error: It\'s not clear which file to import. Found:\ + runner().err( + "@import \"plain\";\n" + ), + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \"plain\";\ + \n | ^^^^^^^\ + \n \'\ + \n input.scss 1:9 root stylesheet\n\ + \nError: It\'s not clear which file to import. Found:\ \n _plain.css\ \n plain.css\ \n ,\ diff --git a/rsass/tests/spec/directives/forward/error/load.rs b/rsass/tests/spec/directives/forward/error/load.rs index 231381b02..bfb752600 100644 --- a/rsass/tests/spec/directives/forward/error/load.rs +++ b/rsass/tests/spec/directives/forward/error/load.rs @@ -59,18 +59,29 @@ mod test_loop { ); } #[test] + #[ignore] // wrong error fn forward_to_import() { let runner = runner().with_cwd("forward_to_import"); assert_eq!( - runner.err("@forward \"other\";\n"), - "Error: This file is already being loaded.\ + runner.err( + "@forward \"other\";\n" + ), + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \"input\";\ + \n | ^^^^^^^\ + \n \'\ + \n other.scss 1:9 @forward\ + \n input.scss 1:1 root stylesheet\n\ + \nError: This file is already being loaded.\ \n ,\ \n1 | @import \"input\";\ \n | ^^^^^^^\ \n \'\ \n other.scss 1:9 @forward\ \n input.scss 1:1 root stylesheet", - ); + ); } #[test] fn forward_to_use() { diff --git a/rsass/tests/spec/directives/forward/error/member/import_to_forward.rs b/rsass/tests/spec/directives/forward/error/member/import_to_forward.rs index 9fb56b2b8..16ff94643 100644 --- a/rsass/tests/spec/directives/forward/error/member/import_to_forward.rs +++ b/rsass/tests/spec/directives/forward/error/member/import_to_forward.rs @@ -39,35 +39,51 @@ mod nested { ); } #[test] + #[ignore] // wrong error fn mixin() { let runner = runner().with_cwd("mixin"); assert_eq!( - runner.err( - "a {@import \"midstream\"}\n\ + runner.err( + "a {@import \"midstream\"}\n\ \nb {@include c}\n" - ), - "Error: Undefined mixin.\ + ), + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {@import \"midstream\"}\ + \n | ^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:12 root stylesheet\n\ + \nError: Undefined mixin.\ \n ,\ \n3 | b {@include c}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 3:4 root stylesheet", - ); + ); } #[test] + #[ignore] // wrong error fn variable() { let runner = runner().with_cwd("variable"); assert_eq!( - runner.err( - "a {@import \"midstream\"}\n\ + runner.err( + "a {@import \"midstream\"}\n\ \nb {c: $d}\n" - ), - "Error: Undefined variable.\ + ), + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {@import \"midstream\"}\ + \n | ^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:12 root stylesheet\n\ + \nError: Undefined variable.\ \n ,\ \n3 | b {c: $d}\ \n | ^^\ \n \'\ \n input.scss 3:7 root stylesheet", - ); + ); } } diff --git a/rsass/tests/spec/directives/import/error/conflict.rs b/rsass/tests/spec/directives/import/error/conflict.rs index a00476d90..221642089 100644 --- a/rsass/tests/spec/directives/import/error/conflict.rs +++ b/rsass/tests/spec/directives/import/error/conflict.rs @@ -42,7 +42,14 @@ fn all() { \n// conflicting extensions.\ \n@import \"other\";\n" ), - "Error: It\'s not clear which file to import. Found:\ + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n3 | @import \"other\";\ + \n | ^^^^^^^\ + \n \'\ + \n input.scss 3:9 root stylesheet\n\ + \nError: It\'s not clear which file to import. Found:\ \n _other.sass\ \n other.sass\ \n _other.scss\ @@ -64,7 +71,14 @@ fn extension() { \n// \".scss\" file.\ \n@import \"other\";\n" ), - "Error: It\'s not clear which file to import. Found:\ + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n3 | @import \"other\";\ + \n | ^^^^^^^\ + \n \'\ + \n input.scss 3:9 root stylesheet\n\ + \nError: It\'s not clear which file to import. Found:\ \n other.sass\ \n other.scss\ \n ,\ @@ -90,7 +104,14 @@ mod import_only { \n// the SCSS import-only file.\ \n@import \"other\";\n" ), - "Error: It\'s not clear which file to import. Found:\ + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n3 | @import \"other\";\ + \n | ^^^^^^^\ + \n \'\ + \n input.scss 3:9 root stylesheet\n\ + \nError: It\'s not clear which file to import. Found:\ \n other.import.sass\ \n other.import.scss\ \n ,\ @@ -110,7 +131,14 @@ mod import_only { \n// the non-partial.\ \n@import \"other.scss\";\n" ), - "Error: It\'s not clear which file to import. Found:\ + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n3 | @import \"other.scss\";\ + \n | ^^^^^^^^^^^^\ + \n \'\ + \n input.scss 3:9 root stylesheet\n\ + \nError: It\'s not clear which file to import. Found:\ \n _other.import.scss\ \n other.import.scss\ \n ,\ @@ -131,7 +159,14 @@ fn index() { \n// the non-partial index file.\ \n@import \"other\";\n" ), - "Error: It\'s not clear which file to import. Found:\ + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n3 | @import \"other\";\ + \n | ^^^^^^^\ + \n \'\ + \n input.scss 3:9 root stylesheet\n\ + \nError: It\'s not clear which file to import. Found:\ \n other/_index.scss\ \n other/index.scss\ \n ,\ @@ -151,7 +186,14 @@ fn partial() { \n// the non-partial file.\ \n@import \"other\";\n" ), - "Error: It\'s not clear which file to import. Found:\ + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n3 | @import \"other\";\ + \n | ^^^^^^^\ + \n \'\ + \n input.scss 3:9 root stylesheet\n\ + \nError: It\'s not clear which file to import. Found:\ \n _other.scss\ \n other.scss\ \n ,\ diff --git a/rsass/tests/spec/directives/import/error/member.rs b/rsass/tests/spec/directives/import/error/member.rs index 85a8db7b6..d42445d8d 100644 --- a/rsass/tests/spec/directives/import/error/member.rs +++ b/rsass/tests/spec/directives/import/error/member.rs @@ -39,36 +39,52 @@ mod inaccessible { ); } #[test] + #[ignore] // wrong error fn mixin() { let runner = runner().with_cwd("mixin"); assert_eq!( - runner.err( - "a {@import \"other\"}\n\ + runner.err( + "a {@import \"other\"}\n\ \nb {@include c}\n" - ), - "Error: Undefined mixin.\ + ), + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {@import \"other\"}\ + \n | ^^^^^^^\ + \n \'\ + \n input.scss 1:12 root stylesheet\n\ + \nError: Undefined mixin.\ \n ,\ \n3 | b {@include c}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 3:4 root stylesheet", - ); + ); } #[test] + #[ignore] // wrong error fn variable() { let runner = runner().with_cwd("variable"); assert_eq!( - runner.err( - "a {@import \"other\"}\n\ + runner.err( + "a {@import \"other\"}\n\ \nb {c: $d}\n" - ), - "Error: Undefined variable.\ + ), + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {@import \"other\"}\ + \n | ^^^^^^^\ + \n \'\ + \n input.scss 1:12 root stylesheet\n\ + \nError: Undefined variable.\ \n ,\ \n3 | b {c: $d}\ \n | ^^\ \n \'\ \n input.scss 3:7 root stylesheet", - ); + ); } } } diff --git a/rsass/tests/spec/directives/import/error/not_found.rs b/rsass/tests/spec/directives/import/error/not_found.rs index 665bc156e..36ba32bfc 100644 --- a/rsass/tests/spec/directives/import/error/not_found.rs +++ b/rsass/tests/spec/directives/import/error/not_found.rs @@ -14,6 +14,7 @@ fn runner() -> crate::TestRunner { } #[test] +#[ignore] // wrong error fn directory_dot_import() { let runner = runner().with_cwd("directory_dot_import"); assert_eq!( @@ -22,7 +23,14 @@ fn directory_dot_import() { \n// directories.\ \n@import \"other\";\n" ), - "Error: Can\'t find stylesheet to import.\ + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n3 | @import \"other\";\ + \n | ^^^^^^^\ + \n \'\ + \n input.scss 3:9 root stylesheet\n\ + \nError: Can\'t find stylesheet to import.\ \n ,\ \n3 | @import \"other\";\ \n | ^^^^^^^\ @@ -31,11 +39,21 @@ fn directory_dot_import() { ); } #[test] +#[ignore] // wrong error fn no_extension() { let runner = runner().with_cwd("no_extension"); assert_eq!( - runner.err("@import \"other\";\n"), - "Error: Can\'t find stylesheet to import.\ + runner.err( + "@import \"other\";\n" + ), + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \"other\";\ + \n | ^^^^^^^\ + \n \'\ + \n input.scss 1:9 root stylesheet\n\ + \nError: Can\'t find stylesheet to import.\ \n ,\ \n1 | @import \"other\";\ \n | ^^^^^^^\ @@ -44,6 +62,7 @@ fn no_extension() { ); } #[test] +#[ignore] // wrong error fn parent_relative() { let runner = runner().with_cwd("parent_relative"); assert_eq!( @@ -53,7 +72,22 @@ fn parent_relative() { \n// Regression test for scssphp/scssphp#242\ \n@import \"dir/child\"\n" ), - "Error: Can\'t find stylesheet to import.\ + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n4 | @import \"dir/child\"\ + \n | ^^^^^^^^^^^\ + \n \'\ + \n input.scss 4:9 root stylesheet\n\ + \nDEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \"sibling\"\ + \n | ^^^^^^^^^\ + \n \'\ + \n dir/child.scss 1:9 @import\ + \n input.scss 4:9 root stylesheet\n\ + \nError: Can\'t find stylesheet to import.\ \n ,\ \n1 | @import \"sibling\"\ \n | ^^^^^^^^^\ diff --git a/rsass/tests/spec/directives/import/load.rs b/rsass/tests/spec/directives/import/load.rs index fd4ee1b5f..3e4ce6c88 100644 --- a/rsass/tests/spec/directives/import/load.rs +++ b/rsass/tests/spec/directives/import/load.rs @@ -82,17 +82,27 @@ mod index { ); } #[test] + #[ignore] // wrong error fn dir_dot_scss() { let runner = runner().with_cwd("dir_dot_scss"); assert_eq!( - runner.err("@import \"dir.scss\";\n"), - "Error: Can\'t find stylesheet to import.\ + runner.err( + "@import \"dir.scss\";\n" + ), + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \"dir.scss\";\ + \n | ^^^^^^^^^^\ + \n \'\ + \n input.scss 1:9 root stylesheet\n\ + \nError: Can\'t find stylesheet to import.\ \n ,\ \n1 | @import \"dir.scss\";\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:9 root stylesheet", - ); + ); } #[test] fn partial() { diff --git a/rsass/tests/spec/directives/test_use/error/load.rs b/rsass/tests/spec/directives/test_use/error/load.rs index 407ca502f..0cbcd3221 100644 --- a/rsass/tests/spec/directives/test_use/error/load.rs +++ b/rsass/tests/spec/directives/test_use/error/load.rs @@ -257,18 +257,28 @@ mod test_loop { } #[test] + #[ignore] // wrong error fn import_to_use() { let runner = runner().with_cwd("import_to_use"); assert_eq!( - runner.err("@import \"other\";\n"), - "Error: Module loop: this module is already being loaded.\ + runner.err( + "@import \"other\";\n" + ), + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \"other\";\ + \n | ^^^^^^^\ + \n \'\ + \n input.scss 1:9 root stylesheet\n\ + \nError: Module loop: this module is already being loaded.\ \n ,\ \n1 | @use \"input\";\ \n | ^^^^^^^^^^^^\ \n \'\ \n other.scss 1:1 @import\ \n input.scss 1:9 root stylesheet", - ); + ); } #[test] fn use_self() { @@ -284,18 +294,29 @@ mod test_loop { ); } #[test] + #[ignore] // wrong error fn use_to_import() { let runner = runner().with_cwd("use_to_import"); assert_eq!( - runner.err("@use \"other\";\n"), - "Error: This file is already being loaded.\ + runner.err( + "@use \"other\";\n" + ), + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \"input\";\ + \n | ^^^^^^^\ + \n \'\ + \n other.scss 1:9 @use\ + \n input.scss 1:1 root stylesheet\n\ + \nError: This file is already being loaded.\ \n ,\ \n1 | @import \"input\";\ \n | ^^^^^^^\ \n \'\ \n other.scss 1:9 @use\ \n input.scss 1:1 root stylesheet", - ); + ); } #[test] fn use_to_use() { diff --git a/rsass/tests/spec/directives/test_use/error/member/inaccessible.rs b/rsass/tests/spec/directives/test_use/error/member/inaccessible.rs index dd2bab510..fee46b73f 100644 --- a/rsass/tests/spec/directives/test_use/error/member/inaccessible.rs +++ b/rsass/tests/spec/directives/test_use/error/member/inaccessible.rs @@ -198,33 +198,47 @@ mod transitive_from_import { fn mixin() { let runner = runner().with_cwd("mixin"); assert_eq!( - runner.err( - "@import \"midstream\";\n\ + runner.err( + "@import \"midstream\";\n\ \n@include upstream;\n" - ), - "Error: Undefined mixin.\ + ), + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \"midstream\";\ + \n | ^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:9 root stylesheet\n\ + \nError: Undefined mixin.\ \n ,\ \n3 | @include upstream;\ \n | ^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 3:1 root stylesheet", - ); + ); } #[test] #[ignore] // missing error fn variable() { let runner = runner().with_cwd("variable"); assert_eq!( - runner.err( - "@import \"midstream\";\n\ + runner.err( + "@import \"midstream\";\n\ \na {b: $upstream};\n" - ), - "Error: Undefined variable.\ + ), + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \"midstream\";\ + \n | ^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:9 root stylesheet\n\ + \nError: Undefined variable.\ \n ,\ \n3 | a {b: $upstream};\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 3:7 root stylesheet", - ); + ); } } diff --git a/rsass/tests/spec/libsass/base_level_parent/imported/at_root_alone.rs b/rsass/tests/spec/libsass/base_level_parent/imported/at_root_alone.rs index 628ea8dd4..493e98e2e 100644 --- a/rsass/tests/spec/libsass/base_level_parent/imported/at_root_alone.rs +++ b/rsass/tests/spec/libsass/base_level_parent/imported/at_root_alone.rs @@ -15,7 +15,14 @@ fn test() { runner().err( "@import \"include.scss\";" ), - "Error: Top-level selectors may not contain the parent selector \"&\".\ + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \"include.scss\";\ + \n | ^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:9 root stylesheet\n\ + \nError: Top-level selectors may not contain the parent selector \"&\".\ \n ,\ \n2 | & {\ \n | ^\ diff --git a/rsass/tests/spec/libsass/base_level_parent/imported/at_root_alone_itpl.rs b/rsass/tests/spec/libsass/base_level_parent/imported/at_root_alone_itpl.rs index 28f20bda0..25f228e8c 100644 --- a/rsass/tests/spec/libsass/base_level_parent/imported/at_root_alone_itpl.rs +++ b/rsass/tests/spec/libsass/base_level_parent/imported/at_root_alone_itpl.rs @@ -11,8 +11,17 @@ fn runner() -> crate::TestRunner { #[ignore] // wrong error fn test() { assert_eq!( - runner().err("@import \"include.scss\";"), - "Error: expected selector.\ + runner().err( + "@import \"include.scss\";" + ), + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \"include.scss\";\ + \n | ^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:9 root stylesheet\n\ + \nError: expected selector.\ \n ,\ \n2 | #{&} {\ \n | ^\ diff --git a/rsass/tests/spec/libsass/base_level_parent/imported/at_root_postfix.rs b/rsass/tests/spec/libsass/base_level_parent/imported/at_root_postfix.rs index a24cb451b..47819a773 100644 --- a/rsass/tests/spec/libsass/base_level_parent/imported/at_root_postfix.rs +++ b/rsass/tests/spec/libsass/base_level_parent/imported/at_root_postfix.rs @@ -15,7 +15,14 @@ fn test() { runner().err( "@import \"include.scss\";" ), - "Error: Top-level selectors may not contain the parent selector \"&\".\ + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \"include.scss\";\ + \n | ^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:9 root stylesheet\n\ + \nError: Top-level selectors may not contain the parent selector \"&\".\ \n ,\ \n2 | &post {\ \n | ^^^^^\ diff --git a/rsass/tests/spec/libsass/base_level_parent/imported/at_root_prefix.rs b/rsass/tests/spec/libsass/base_level_parent/imported/at_root_prefix.rs index 133489b3d..a4237465b 100644 --- a/rsass/tests/spec/libsass/base_level_parent/imported/at_root_prefix.rs +++ b/rsass/tests/spec/libsass/base_level_parent/imported/at_root_prefix.rs @@ -11,8 +11,17 @@ fn runner() -> crate::TestRunner { #[ignore] // wrong error fn test() { assert_eq!( - runner().err("@import \"include.scss\";"), - "Error: \"&\" may only used at the beginning of a compound selector.\ + runner().err( + "@import \"include.scss\";" + ), + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \"include.scss\";\ + \n | ^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:9 root stylesheet\n\ + \nError: \"&\" may only used at the beginning of a compound selector.\ \n ,\ \n2 | pre& {\ \n | ^\ diff --git a/rsass/tests/spec/libsass/base_level_parent/imported/basic_alone.rs b/rsass/tests/spec/libsass/base_level_parent/imported/basic_alone.rs index dc2bdb632..40a1121e2 100644 --- a/rsass/tests/spec/libsass/base_level_parent/imported/basic_alone.rs +++ b/rsass/tests/spec/libsass/base_level_parent/imported/basic_alone.rs @@ -14,7 +14,14 @@ fn test() { runner().err( "@import \"include.scss\";" ), - "Error: Top-level selectors may not contain the parent selector \"&\".\ + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \"include.scss\";\ + \n | ^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:9 root stylesheet\n\ + \nError: Top-level selectors may not contain the parent selector \"&\".\ \n ,\ \n1 | & {\ \n | ^\ diff --git a/rsass/tests/spec/libsass/base_level_parent/imported/basic_alone_itpl.rs b/rsass/tests/spec/libsass/base_level_parent/imported/basic_alone_itpl.rs index edd9187dd..1ee1593f3 100644 --- a/rsass/tests/spec/libsass/base_level_parent/imported/basic_alone_itpl.rs +++ b/rsass/tests/spec/libsass/base_level_parent/imported/basic_alone_itpl.rs @@ -12,8 +12,17 @@ fn runner() -> crate::TestRunner { #[ignore] // wrong error fn test() { assert_eq!( - runner().err("@import \"include.scss\";"), - "Error: expected selector.\ + runner().err( + "@import \"include.scss\";" + ), + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \"include.scss\";\ + \n | ^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:9 root stylesheet\n\ + \nError: expected selector.\ \n ,\ \n1 | #{&} {\ \n | ^\ diff --git a/rsass/tests/spec/libsass/base_level_parent/imported/basic_postfix.rs b/rsass/tests/spec/libsass/base_level_parent/imported/basic_postfix.rs index 797eccdcf..65040d4b2 100644 --- a/rsass/tests/spec/libsass/base_level_parent/imported/basic_postfix.rs +++ b/rsass/tests/spec/libsass/base_level_parent/imported/basic_postfix.rs @@ -14,7 +14,14 @@ fn test() { runner().err( "@import \"include.scss\";" ), - "Error: Top-level selectors may not contain the parent selector \"&\".\ + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \"include.scss\";\ + \n | ^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:9 root stylesheet\n\ + \nError: Top-level selectors may not contain the parent selector \"&\".\ \n ,\ \n1 | &post {\ \n | ^^^^^\ diff --git a/rsass/tests/spec/libsass/base_level_parent/imported/basic_prefix.rs b/rsass/tests/spec/libsass/base_level_parent/imported/basic_prefix.rs index 90600e915..96a1702fa 100644 --- a/rsass/tests/spec/libsass/base_level_parent/imported/basic_prefix.rs +++ b/rsass/tests/spec/libsass/base_level_parent/imported/basic_prefix.rs @@ -12,8 +12,17 @@ fn runner() -> crate::TestRunner { #[ignore] // wrong error fn test() { assert_eq!( - runner().err("@import \"include.scss\";"), - "Error: \"&\" may only used at the beginning of a compound selector.\ + runner().err( + "@import \"include.scss\";" + ), + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \"include.scss\";\ + \n | ^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:9 root stylesheet\n\ + \nError: \"&\" may only used at the beginning of a compound selector.\ \n ,\ \n1 | pre& {\ \n | ^\ diff --git a/rsass/tests/spec/libsass_closed_issues/issue_1266/max.rs b/rsass/tests/spec/libsass_closed_issues/issue_1266/max.rs index b4bc1195f..5dd681025 100644 --- a/rsass/tests/spec/libsass_closed_issues/issue_1266/max.rs +++ b/rsass/tests/spec/libsass_closed_issues/issue_1266/max.rs @@ -23,6 +23,14 @@ fn test() { \n | ^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 4:8 root stylesheet\n\ + \nDEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse math.max instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n4 | bar: meta.call(max, $foo...);\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 4:8 root stylesheet\n\ \nError: blah is not a number.\ \n ,\ \n4 | bar: meta.call(max, $foo...);\ diff --git a/rsass/tests/spec/libsass_closed_issues/issue_1266/min.rs b/rsass/tests/spec/libsass_closed_issues/issue_1266/min.rs index 6e757eda5..b0477ab13 100644 --- a/rsass/tests/spec/libsass_closed_issues/issue_1266/min.rs +++ b/rsass/tests/spec/libsass_closed_issues/issue_1266/min.rs @@ -23,6 +23,14 @@ fn test() { \n | ^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 4:8 root stylesheet\n\ + \nDEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse math.min instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n4 | bar: meta.call(min, $foo...);\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 4:8 root stylesheet\n\ \nError: blah is not a number.\ \n ,\ \n4 | bar: meta.call(min, $foo...);\ diff --git a/rsass/tests/spec/libsass_closed_issues/issue_1739/interpolate/both.rs b/rsass/tests/spec/libsass_closed_issues/issue_1739/interpolate/both.rs index 3af70832a..6daae1433 100644 --- a/rsass/tests/spec/libsass_closed_issues/issue_1739/interpolate/both.rs +++ b/rsass/tests/spec/libsass_closed_issues/issue_1739/interpolate/both.rs @@ -45,45 +45,45 @@ fn test() { \n baz: #{1 % 2} % #{1 % 2};\r\ \n}" ), - "DEPRECATION WARNING on line 11, column 10 of input.scss: \ - \nThis operation is parsed as:\n\ + "DEPRECATION WARNING: This operation is parsed as:\n\ \n 1 + 2\n\ \nbut you may have intended it to mean:\n\ \n 1 (+2)\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ - \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\ + \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n11 | baz: #{1 +2} +#{1 +2};\ \n | ^^^^^\ - \n \'\n\ - \nDEPRECATION WARNING on line 11, column 21 of input.scss: \ - \nThis operation is parsed as:\n\ + \n \'\ + \n input.scss 11:10 root stylesheet\n\ + \nDEPRECATION WARNING: This operation is parsed as:\n\ \n 1 + 2\n\ \nbut you may have intended it to mean:\n\ \n 1 (+2)\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ - \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\ + \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n11 | baz: #{1 +2} +#{1 +2};\ \n | ^^^^^\ - \n \'\n\ - \nDEPRECATION WARNING on line 11, column 8 of input.scss: \ - \nThis operation is parsed as:\n\ + \n \'\ + \n input.scss 11:21 root stylesheet\n\ + \nDEPRECATION WARNING: This operation is parsed as:\n\ \n #{1 + 2} + #{1 + 2}\n\ \nbut you may have intended it to mean:\n\ \n #{1 + 2} (+#{1 + 2})\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ - \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\ + \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n11 | baz: #{1 +2} +#{1 +2};\ \n | ^^^^^^^^^^^^^^^^^^^\ - \n \'\n\ + \n \'\ + \n input.scss 11:8 root stylesheet\n\ \nError: Undefined operation \"2 * 2\".\ \n ,\ \n23 | baz: #{1*2}*#{1*2};\ diff --git a/rsass/tests/spec/libsass_closed_issues/issue_1739/interpolate/left.rs b/rsass/tests/spec/libsass_closed_issues/issue_1739/interpolate/left.rs index ed8a1036f..90742e12a 100644 --- a/rsass/tests/spec/libsass_closed_issues/issue_1739/interpolate/left.rs +++ b/rsass/tests/spec/libsass_closed_issues/issue_1739/interpolate/left.rs @@ -45,32 +45,32 @@ fn test() { \n baz: #{1 % 2} % 3;\r\ \n}" ), - "DEPRECATION WARNING on line 11, column 10 of input.scss: \ - \nThis operation is parsed as:\n\ + "DEPRECATION WARNING: This operation is parsed as:\n\ \n 1 + 2\n\ \nbut you may have intended it to mean:\n\ \n 1 (+2)\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ - \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\ + \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n11 | baz: #{1 +2} +3;\ \n | ^^^^^\ - \n \'\n\ - \nDEPRECATION WARNING on line 11, column 8 of input.scss: \ - \nThis operation is parsed as:\n\ + \n \'\ + \n input.scss 11:10 root stylesheet\n\ + \nDEPRECATION WARNING: This operation is parsed as:\n\ \n #{1 + 2} + 3\n\ \nbut you may have intended it to mean:\n\ \n #{1 + 2} (+3)\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ - \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\ + \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n11 | baz: #{1 +2} +3;\ \n | ^^^^^^^^^^^^\ - \n \'\n\ + \n \'\ + \n input.scss 11:8 root stylesheet\n\ \nError: Undefined operation \"2 * 3\".\ \n ,\ \n23 | baz: #{1*2}*3;\ diff --git a/rsass/tests/spec/libsass_closed_issues/issue_1739/interpolate/right.rs b/rsass/tests/spec/libsass_closed_issues/issue_1739/interpolate/right.rs index 09ab53695..2a401f22b 100644 --- a/rsass/tests/spec/libsass_closed_issues/issue_1739/interpolate/right.rs +++ b/rsass/tests/spec/libsass_closed_issues/issue_1739/interpolate/right.rs @@ -45,32 +45,32 @@ fn test() { \n baz: 3 % #{1 % 2};\r\ \n}" ), - "DEPRECATION WARNING on line 11, column 14 of input.scss: \ - \nThis operation is parsed as:\n\ + "DEPRECATION WARNING: This operation is parsed as:\n\ \n 1 + 2\n\ \nbut you may have intended it to mean:\n\ \n 1 (+2)\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ - \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\ + \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n11 | baz: 3 +#{1 +2};\ \n | ^^^^^\ - \n \'\n\ - \nDEPRECATION WARNING on line 11, column 8 of input.scss: \ - \nThis operation is parsed as:\n\ + \n \'\ + \n input.scss 11:14 root stylesheet\n\ + \nDEPRECATION WARNING: This operation is parsed as:\n\ \n 3 + #{1 + 2}\n\ \nbut you may have intended it to mean:\n\ \n 3 (+#{1 + 2})\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ - \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\ + \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n11 | baz: 3 +#{1 +2};\ \n | ^^^^^^^^^^^^\ - \n \'\n\ + \n \'\ + \n input.scss 11:8 root stylesheet\n\ \nError: Undefined operation \"3 * 2\".\ \n ,\ \n23 | baz: 3*#{1*2};\ diff --git a/rsass/tests/spec/libsass_closed_issues/issue_1801/import_cycle.rs b/rsass/tests/spec/libsass_closed_issues/issue_1801/import_cycle.rs index 90369ad55..a1e3124b8 100644 --- a/rsass/tests/spec/libsass_closed_issues/issue_1801/import_cycle.rs +++ b/rsass/tests/spec/libsass_closed_issues/issue_1801/import_cycle.rs @@ -9,10 +9,37 @@ fn runner() -> crate::TestRunner { } #[test] +#[ignore] // wrong error fn test() { assert_eq!( - runner().err("@import \'alpha\';\n"), - "Error: This file is already being loaded.\ + runner().err( + "@import \'alpha\';\n" + ), + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \'alpha\';\ + \n | ^^^^^^^\ + \n \'\ + \n input.scss 1:9 root stylesheet\n\ + \nDEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \'beta\';\ + \n | ^^^^^^\ + \n \'\ + \n _alpha.scss 1:9 @import\ + \n input.scss 1:9 root stylesheet\n\ + \nDEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \'alpha\';\ + \n | ^^^^^^^\ + \n \'\ + \n _beta.scss 1:9 @import\ + \n _alpha.scss 1:9 @import\ + \n input.scss 1:9 root stylesheet\n\ + \nError: This file is already being loaded.\ \n ,--> _beta.scss\ \n1 | @import \'alpha\';\ \n | ^^^^^^^ new load\ diff --git a/rsass/tests/spec/libsass_closed_issues/issue_2106/test.rs b/rsass/tests/spec/libsass_closed_issues/issue_2106/test.rs index c5105eb2e..9fb9293f9 100644 --- a/rsass/tests/spec/libsass_closed_issues/issue_2106/test.rs +++ b/rsass/tests/spec/libsass_closed_issues/issue_2106/test.rs @@ -6,10 +6,20 @@ fn runner() -> crate::TestRunner { } #[test] +#[ignore] // wrong error fn test() { assert_eq!( - runner().err("@import \"../does-not-exist\";\n"), - "Error: Can\'t find stylesheet to import.\ + runner().err( + "@import \"../does-not-exist\";\n" + ), + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \"../does-not-exist\";\ + \n | ^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:9 root stylesheet\n\ + \nError: Can\'t find stylesheet to import.\ \n ,\ \n1 | @import \"../does-not-exist\";\ \n | ^^^^^^^^^^^^^^^^^^^\ diff --git a/rsass/tests/spec/libsass_closed_issues/issue_2304.rs b/rsass/tests/spec/libsass_closed_issues/issue_2304.rs index e0e73aa47..41e94da1b 100644 --- a/rsass/tests/spec/libsass_closed_issues/issue_2304.rs +++ b/rsass/tests/spec/libsass_closed_issues/issue_2304.rs @@ -14,7 +14,14 @@ fn test() { runner().err( "@import \"module\";" ), - "Error: Top-level selectors may not contain the parent selector \"&\".\ + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \"module\";\ + \n | ^^^^^^^^\ + \n \'\ + \n input.scss 1:9 root stylesheet\n\ + \nError: Top-level selectors may not contain the parent selector \"&\".\ \n ,\ \n1 | .foo, & {\ \n | ^\ diff --git a/rsass/tests/spec/libsass_todo_issues/issue_1801/simple_import_loop.rs b/rsass/tests/spec/libsass_todo_issues/issue_1801/simple_import_loop.rs index 78ac95caf..d3213158c 100644 --- a/rsass/tests/spec/libsass_todo_issues/issue_1801/simple_import_loop.rs +++ b/rsass/tests/spec/libsass_todo_issues/issue_1801/simple_import_loop.rs @@ -8,10 +8,28 @@ fn runner() -> crate::TestRunner { } #[test] +#[ignore] // wrong error fn test() { assert_eq!( - runner().err("@import \'susy\';\n"), - "Error: This file is already being loaded.\ + runner().err( + "@import \'susy\';\n" + ), + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \'susy\';\ + \n | ^^^^^^\ + \n \'\ + \n input.scss 1:9 root stylesheet\n\ + \nDEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | @import \'susy\';\ + \n | ^^^^^^\ + \n \'\ + \n _susy.scss 1:9 @import\ + \n input.scss 1:9 root stylesheet\n\ + \nError: This file is already being loaded.\ \n ,--> _susy.scss\ \n1 | @import \'susy\';\ \n | ^^^^^^ new load\ diff --git a/rsass/tests/spec/libsass_todo_issues/issue_2295/error/basic.rs b/rsass/tests/spec/libsass_todo_issues/issue_2295/error/basic.rs index 1fe932ff9..379a1b927 100644 --- a/rsass/tests/spec/libsass_todo_issues/issue_2295/error/basic.rs +++ b/rsass/tests/spec/libsass_todo_issues/issue_2295/error/basic.rs @@ -16,7 +16,14 @@ fn test() { \n @import \'include.scss\';\r\ \n}" ), - "Error: expected \"{\".\ + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n2 | @import \'include.scss\';\ + \n | ^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 2:11 root stylesheet\n\ + \nError: expected \"{\".\ \n ,\ \n1 | display: none;\ \n | ^\ diff --git a/rsass/tests/spec/libsass_todo_issues/issue_2295/error/wrapped.rs b/rsass/tests/spec/libsass_todo_issues/issue_2295/error/wrapped.rs index d5a7146e0..e59c159fb 100644 --- a/rsass/tests/spec/libsass_todo_issues/issue_2295/error/wrapped.rs +++ b/rsass/tests/spec/libsass_todo_issues/issue_2295/error/wrapped.rs @@ -16,7 +16,14 @@ fn test() { \n @import \'include.scss\';\r\ \n}" ), - "Error: expected \"{\".\ + "DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n2 | @import \'include.scss\';\ + \n | ^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 2:11 root stylesheet\n\ + \nError: expected \"{\".\ \n ,\ \n2 | display: none;\ \n | ^\ diff --git a/rsass/tests/spec/main.rs b/rsass/tests/spec/main.rs index a5a5e6ff8..474d2413c 100644 --- a/rsass/tests/spec/main.rs +++ b/rsass/tests/spec/main.rs @@ -1,5 +1,5 @@ //! Tests auto-converted from "sass-spec/spec" -//! version 6d8663d13, 2024-10-10 23:57:48 +0000. +//! version eabbabcd9, 2024-10-18 23:32:44 +0000. //! See for source material.\n //! The following tests are excluded from conversion: //! ["directives/extend", "libsass-todo-issues/issue_221260.hrx", "libsass-todo-issues/issue_221262.hrx", "libsass-todo-issues/issue_221264.hrx", "libsass-todo-issues/issue_221292.hrx", "libsass/unicode-bom/utf-16-big", "libsass/unicode-bom/utf-16-little", "non_conformant/scss/huge.hrx", "non_conformant/scss/multiline-var.hrx"] diff --git a/rsass/tests/spec/non_conformant/scss/interpolation_operators_precedence.rs b/rsass/tests/spec/non_conformant/scss/interpolation_operators_precedence.rs index 075a28d16..fa4520a3d 100644 --- a/rsass/tests/spec/non_conformant/scss/interpolation_operators_precedence.rs +++ b/rsass/tests/spec/non_conformant/scss/interpolation_operators_precedence.rs @@ -59,136 +59,136 @@ fn test() { \n e06: (#{a} !=5.0% != 2);\ \n}\n" ), - "DEPRECATION WARNING on line 4, column 9 of input.scss: \ - \nThis operation is parsed as:\n\ + "DEPRECATION WARNING: This operation is parsed as:\n\ \n #{a} + 5%\n\ \nbut you may have intended it to mean:\n\ \n #{a} (+5%)\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ - \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\ + \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n4 | a03: (#{a} +5.0% + 2);\ \n | ^^^^^^^^^^^\ - \n \'\n\ - \nDEPRECATION WARNING on line 8, column 9 of input.scss: \ - \nThis operation is parsed as:\n\ + \n \'\ + \n input.scss 4:9 root stylesheet\n\ + \nDEPRECATION WARNING: This operation is parsed as:\n\ \n 5 + 2% + #{a}\n\ \nbut you may have intended it to mean:\n\ \n 5 + 2% (+#{a})\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ - \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\ + \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n8 | b03: (5 + 2.0% +#{a});\ \n | ^^^^^^^^^^^^^^^\ - \n \'\n\ - \nDEPRECATION WARNING on line 10, column 9 of input.scss: \ - \nThis operation is parsed as:\n\ + \n \'\ + \n input.scss 8:9 root stylesheet\n\ + \nDEPRECATION WARNING: This operation is parsed as:\n\ \n #{a} + 5%\n\ \nbut you may have intended it to mean:\n\ \n #{a} (+5%)\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ - \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\ + \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n10 | c01: (#{a} +5.0% + 2);\ \n | ^^^^^^^^^^\ - \n \'\n\ - \nDEPRECATION WARNING on line 14, column 9 of input.scss: \ - \nThis operation is parsed as:\n\ + \n \'\ + \n input.scss 10:9 root stylesheet\n\ + \nDEPRECATION WARNING: This operation is parsed as:\n\ \n #{a} + 5%\n\ \nbut you may have intended it to mean:\n\ \n #{a} (+5%)\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ - \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\ + \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n14 | c05: (#{a} +5.0% - 2);\ \n | ^^^^^^^^^^\ - \n \'\n\ - \nDEPRECATION WARNING on line 18, column 9 of input.scss: \ - \nThis operation is parsed as:\n\ + \n \'\ + \n input.scss 14:9 root stylesheet\n\ + \nDEPRECATION WARNING: This operation is parsed as:\n\ \n #{a} + 5% / 2\n\ \nbut you may have intended it to mean:\n\ \n #{a} (+5% / 2)\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ - \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\ + \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n18 | c09: (#{a} +5.0% / 2);\ \n | ^^^^^^^^^^^^^^\ - \n \'\n\ - \nDEPRECATION WARNING on line 22, column 9 of input.scss: \ - \nThis operation is parsed as:\n\ + \n \'\ + \n input.scss 18:9 root stylesheet\n\ + \nDEPRECATION WARNING: This operation is parsed as:\n\ \n #{a} + 5% * 2\n\ \nbut you may have intended it to mean:\n\ \n #{a} (+5% * 2)\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ - \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\ + \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n22 | c13: (#{a} +5.0% * 2);\ \n | ^^^^^^^^^^^^^^\ - \n \'\n\ - \nDEPRECATION WARNING on line 26, column 9 of input.scss: \ - \nThis operation is parsed as:\n\ + \n \'\ + \n input.scss 22:9 root stylesheet\n\ + \nDEPRECATION WARNING: This operation is parsed as:\n\ \n 5 + 2% + #{a}\n\ \nbut you may have intended it to mean:\n\ \n 5 + 2% (+#{a})\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ - \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\ + \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n26 | d01: (5 + 2.0% +#{a});\ \n | ^^^^^^^^^^^^^^\ - \n \'\n\ - \nDEPRECATION WARNING on line 30, column 9 of input.scss: \ - \nThis operation is parsed as:\n\ + \n \'\ + \n input.scss 26:9 root stylesheet\n\ + \nDEPRECATION WARNING: This operation is parsed as:\n\ \n 5 - 2% + #{a}\n\ \nbut you may have intended it to mean:\n\ \n 5 - 2% (+#{a})\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ - \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\ + \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n30 | d05: (5 - 2.0% +#{a});\ \n | ^^^^^^^^^^^^^^\ - \n \'\n\ - \nDEPRECATION WARNING on line 34, column 9 of input.scss: \ - \nThis operation is parsed as:\n\ + \n \'\ + \n input.scss 30:9 root stylesheet\n\ + \nDEPRECATION WARNING: This operation is parsed as:\n\ \n 5% / 2 + #{a}\n\ \nbut you may have intended it to mean:\n\ \n 5% / 2 (+#{a})\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ - \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\ + \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n34 | d09: (5% / 2.0 +#{a});\ \n | ^^^^^^^^^^^^^^\ - \n \'\n\ - \nDEPRECATION WARNING on line 38, column 9 of input.scss: \ - \nThis operation is parsed as:\n\ + \n \'\ + \n input.scss 34:9 root stylesheet\n\ + \nDEPRECATION WARNING: This operation is parsed as:\n\ \n 5 * 2% + #{a}\n\ \nbut you may have intended it to mean:\n\ \n 5 * 2% (+#{a})\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ - \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\ + \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n38 | d13: (5 * 2.0% +#{a});\ \n | ^^^^^^^^^^^^^^\ - \n \'\n\ + \n \'\ + \n input.scss 38:9 root stylesheet\n\ \nError: Undefined operation \"a * 5%\".\ \n ,\ \n13 | c04: (#{a} *5.0% + 2);\ diff --git a/rsass/tests/spec/values/calculation/calc/error/syntax.rs b/rsass/tests/spec/values/calculation/calc/error/syntax.rs index b0ad95de7..b034e7927 100644 --- a/rsass/tests/spec/values/calculation/calc/error/syntax.rs +++ b/rsass/tests/spec/values/calculation/calc/error/syntax.rs @@ -179,19 +179,19 @@ mod no_whitespace { runner().err( "a {b: calc(1 +1)}\n" ), - "DEPRECATION WARNING on line 1, column 12 of input.scss: \ - \nThis operation is parsed as:\n\ + "DEPRECATION WARNING: This operation is parsed as:\n\ \n 1 + 1\n\ \nbut you may have intended it to mean:\n\ \n 1 (+1)\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ - \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\ + \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n1 | a {b: calc(1 +1)}\ \n | ^^^^\ - \n \'\n\ + \n \'\ + \n input.scss 1:12 root stylesheet\n\ \nError: \"+\" and \"-\" must be surrounded by whitespace in calculations.\ \n ,\ \n1 | a {b: calc(1 +1)}\ diff --git a/rsass/tests/spec/values/calculation/round/error.rs b/rsass/tests/spec/values/calculation/round/error.rs index 7a8974ecd..659f6b8cb 100644 --- a/rsass/tests/spec/values/calculation/round/error.rs +++ b/rsass/tests/spec/values/calculation/round/error.rs @@ -14,16 +14,27 @@ mod one_argument { use super::runner; #[test] + #[ignore] // wrong error fn variable_named_argument() { assert_eq!( - runner().err("a {b: round($number: var(--c))}\n"), - "Error: $number: var(--c) is not a number.\ + runner().err( + "a {b: round($number: var(--c))}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse math.round instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: round($number: var(--c))}\ + \n | ^^^^^^^^^^^^^^^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $number: var(--c) is not a number.\ \n ,\ \n1 | a {b: round($number: var(--c))}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } } mod syntax { @@ -45,16 +56,27 @@ mod one_argument { } } #[test] + #[ignore] // wrong error fn test_type() { assert_eq!( - runner().err("a {b: round(\"0\")}\n"), - "Error: $number: \"0\" is not a number.\ + runner().err( + "a {b: round(\"0\")}\n" + ), + "DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ + \nUse math.round instead.\n\ + \nMore info and automated migrator: https://sass-lang.com/d/import\n\ + \n ,\ + \n1 | a {b: round(\"0\")}\ + \n | ^^^^^^^^^^\ + \n \'\ + \n input.scss 1:7 root stylesheet\n\ + \nError: $number: \"0\" is not a number.\ \n ,\ \n1 | a {b: round(\"0\")}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", - ); + ); } #[test] fn unsimplifiable() { diff --git a/rsass/tests/spec/values/colors/equality.rs b/rsass/tests/spec/values/colors/equality.rs index 962df24d0..2bd6d802a 100644 --- a/rsass/tests/spec/values/colors/equality.rs +++ b/rsass/tests/spec/values/colors/equality.rs @@ -22,7 +22,8 @@ mod test_false { #[test] fn different_type() { assert_eq!( - runner().ok("a {b: red == unquote(\"red\")}\n"), + runner().ok("@use \"sass:string\";\n\ + \na {b: red == string.unquote(\"red\")}\n"), "a {\ \n b: false;\ \n}\n"