summaryrefslogtreecommitdiff
path: root/tests/typ/compiler/string.typ
diff options
context:
space:
mode:
Diffstat (limited to 'tests/typ/compiler/string.typ')
-rw-r--r--tests/typ/compiler/string.typ7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/typ/compiler/string.typ b/tests/typ/compiler/string.typ
index 017e1cdd..7692b41f 100644
--- a/tests/typ/compiler/string.typ
+++ b/tests/typ/compiler/string.typ
@@ -46,6 +46,13 @@
#"🏳️‍🌈".slice(0, -1)
---
+// Test the `clusters` and `codepoints` methods.
+#test("abc".clusters(), ("a", "b", "c"))
+#test("abc".clusters(), ("a", "b", "c"))
+#test("🏳️‍🌈!".clusters(), ("🏳️‍🌈", "!"))
+#test("🏳️‍🌈!".codepoints(), ("🏳", "\u{fe0f}", "\u{200d}", "🌈", "!"))
+
+---
// Test the `contains` method.
#test("abc".contains("b"), true)
#test("b" in "abc", true)