From d10b6187b993cb662b6486ddda5c54846ee14472 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Wed, 17 Jul 2019 22:02:08 -0400 Subject: [PATCH] fix: non-integers passed to str-slice [skip libsass] --- spec/core_functions/string/slice.hrx | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/spec/core_functions/string/slice.hrx b/spec/core_functions/string/slice.hrx index 18c470a360..3857635f88 100644 --- a/spec/core_functions/string/slice.hrx +++ b/spec/core_functions/string/slice.hrx @@ -377,13 +377,6 @@ Error: argument `$end-at` of `str-slice($string, $start-at, $end-at:-1)` must be ------^ -<===> -================================================================================ -<===> error/decimal/options.yml ---- -:todo: -- sass/libsass#2922 - <===> ================================================================================ <===> error/decimal/start/input.scss @@ -397,6 +390,14 @@ Error: 0.5 is not an int. ' input.scss 1:7 root stylesheet +<===> error/decimal/start/error-libsass +Error: $start-at: 0.500000 is not an int + on line 1:7 of input.scss, in function `str-slice` + from line 1:7 of input.scss +>> a {b: str-slice("", 0.5)} + + ------^ + <===> ================================================================================ <===> error/decimal/end/input.scss @@ -410,6 +411,14 @@ Error: 1.5 is not an int. ' input.scss 1:7 root stylesheet +<===> error/decimal/end/error-libsass +Error: $end-at: 1.500000 is not an int + on line 1:7 of input.scss, in function `str-slice` + from line 1:7 of input.scss +>> a {b: str-slice("", 1, 1.5)} + + ------^ + <===> ================================================================================ <===> error/too_few_args/input.scss