summaryrefslogtreecommitdiff
path: root/tests/typ/compiler
diff options
context:
space:
mode:
authorKevin K <xkeviota@gmail.com>2023-08-26 17:35:52 +0200
committerGitHub <noreply@github.com>2023-08-26 17:35:52 +0200
commit45bd58fbaac4419a45246865cf44ded7920d5b84 (patch)
tree871fe5a273b5cd46880e76200284661bf6c7c115 /tests/typ/compiler
parentcd13e55dd1577fd98943982b686f245940d5ab72 (diff)
Implement `rev()` method on string (#2013)
Diffstat (limited to 'tests/typ/compiler')
-rw-r--r--tests/typ/compiler/string.typ9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/typ/compiler/string.typ b/tests/typ/compiler/string.typ
index 4241361a..b0708979 100644
--- a/tests/typ/compiler/string.typ
+++ b/tests/typ/compiler/string.typ
@@ -211,5 +211,14 @@
#test("a123c".split(regex("\d+")), ("a", "c"))
---
+// Test the `rev` method.
+#test("abc".rev(), "cba")
+#test("ax̂e".rev(), "ex̂a")
+
+---
+// Error: 12-15 unknown variable: arg
+#"abc".rev(arg)
+
+---
// Error: 2-2:1 unclosed string
#"hello\"