diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typ/compiler/string.typ | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/typ/compiler/string.typ b/tests/typ/compiler/string.typ index d96213b6..017e1cdd 100644 --- a/tests/typ/compiler/string.typ +++ b/tests/typ/compiler/string.typ @@ -27,8 +27,12 @@ #test("Hey: π³οΈβπ there!".at(5), "π³οΈβπ") --- -// Error: 4-17 string index out of bounds (index: 5, len: 5) -#{ "Hello".at(5) } +// Error: 2-14 string index 2 is not a character boundary +#"π³οΈβπ".at(2) + +--- +// Error: 2-15 string index out of bounds (index: 5, len: 5) +#"Hello".at(5) --- // Test the `slice` method. @@ -38,6 +42,10 @@ #test("abcπ‘def".slice(-3, -1), "de") --- +// Error: 2-21 string index -1 is not a character boundary +#"π³οΈβπ".slice(0, -1) + +--- // Test the `contains` method. #test("abc".contains("b"), true) #test("b" in "abc", true) |
