summaryrefslogtreecommitdiff
path: root/tests/typ/compiler/string.typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-02-17 16:32:48 +0100
committerLaurenz <laurmaedje@gmail.com>2023-02-17 16:32:48 +0100
commit028632a3a10202ee21eaaf7ecf13ca7fe331106e (patch)
treeecba2b74b52b2c94b8ccf63dc8099d8ef608081c /tests/typ/compiler/string.typ
parentdd5f07eb9110cc5e19dcb4441743a323128426fc (diff)
Fix error handling after hashtag
Diffstat (limited to 'tests/typ/compiler/string.typ')
-rw-r--r--tests/typ/compiler/string.typ16
1 files changed, 10 insertions, 6 deletions
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\"