Skip to content

Commit d10b618

Browse files
committed
fix: non-integers passed to str-slice
[skip libsass]
1 parent 4ee20fa commit d10b618

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

spec/core_functions/string/slice.hrx

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -377,13 +377,6 @@ Error: argument `$end-at` of `str-slice($string, $start-at, $end-at:-1)` must be
377377

378378
------^
379379

380-
<===>
381-
================================================================================
382-
<===> error/decimal/options.yml
383-
---
384-
:todo:
385-
- sass/libsass#2922
386-
387380
<===>
388381
================================================================================
389382
<===> error/decimal/start/input.scss
@@ -397,6 +390,14 @@ Error: 0.5 is not an int.
397390
'
398391
input.scss 1:7 root stylesheet
399392

393+
<===> error/decimal/start/error-libsass
394+
Error: $start-at: 0.500000 is not an int
395+
on line 1:7 of input.scss, in function `str-slice`
396+
from line 1:7 of input.scss
397+
>> a {b: str-slice("", 0.5)}
398+
399+
------^
400+
400401
<===>
401402
================================================================================
402403
<===> error/decimal/end/input.scss
@@ -410,6 +411,14 @@ Error: 1.5 is not an int.
410411
'
411412
input.scss 1:7 root stylesheet
412413

414+
<===> error/decimal/end/error-libsass
415+
Error: $end-at: 1.500000 is not an int
416+
on line 1:7 of input.scss, in function `str-slice`
417+
from line 1:7 of input.scss
418+
>> a {b: str-slice("", 1, 1.5)}
419+
420+
------^
421+
413422
<===>
414423
================================================================================
415424
<===> error/too_few_args/input.scss

0 commit comments

Comments
 (0)