From ca1a942b74745617791c5768320503cdba782e42 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Mon, 24 Feb 2025 16:58:35 -0800 Subject: [PATCH] Add a regression test for sass/dart-sass#2523 (#2047) --- .../values/calculation/round/one_argument.hrx | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/spec/values/calculation/round/one_argument.hrx b/spec/values/calculation/round/one_argument.hrx index 4d41fe726..2d0f2b7d9 100644 --- a/spec/values/calculation/round/one_argument.hrx +++ b/spec/values/calculation/round/one_argument.hrx @@ -143,6 +143,31 @@ More info and automated migrator: https://sass-lang.com/d/slash-div ' input.scss 2:6 root stylesheet +<===> +================================================================================ +<===> calc_unsafe_in_binary_operator/input.scss +// Regression test for sass/dart-sass#2523 +b { + a: round(-(1) + 2); +} + +<===> calc_unsafe_in_binary_operator/output.css +b { + a: 1; +} + +<===> calc_unsafe_in_binary_operator/warning +DEPRECATION WARNING [global-builtin]: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0. +Use math.round instead. + +More info and automated migrator: https://sass-lang.com/d/import + + , +3 | a: round(-(1) + 2); + | ^^^^^^^^^^^^^^^ + ' + input.scss 3:6 root stylesheet + <===> ================================================================================ <===> case_insensitive/input.scss