From 028632a3a10202ee21eaaf7ecf13ca7fe331106e Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 17 Feb 2023 16:32:48 +0100 Subject: Fix error handling after hashtag --- tests/typ/compiler/string.typ | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'tests/typ/compiler/string.typ') diff --git a/tests/typ/compiler/string.typ b/tests/typ/compiler/string.typ index 7692b41f..95e204c5 100644 --- a/tests/typ/compiler/string.typ +++ b/tests/typ/compiler/string.typ @@ -13,12 +13,12 @@ #test("🏳️‍🌈A🏳️‍⚧️".last(), "🏳️‍⚧️") --- -// Error: 4-14 string is empty -#{ "".first() } +// Error: 2-12 string is empty +#"".first() --- -// Error: 4-13 string is empty -#{ "".last() } +// Error: 2-11 string is empty +#"".last() --- // Test the `at` method. @@ -150,8 +150,8 @@ #test("hello world".trim(regex(".")), "") --- -// Error: 18-22 expected either `start` or `end` -#{"abc".trim(at: left)} +// Error: 17-21 expected either `start` or `end` +#"abc".trim(at: left) --- // Test the `split` method. @@ -159,3 +159,7 @@ #test("abc".split("b"), ("a", "c")) #test("a123c".split(regex("\d")), ("a", "", "", "c")) #test("a123c".split(regex("\d+")), ("a", "c")) + +--- +// Error: 2:1 expected quote +#"hello\" -- cgit v1.2.3