summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/typ/compiler/show-text.typ13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/typ/compiler/show-text.typ b/tests/typ/compiler/show-text.typ
index e635574c..c279507b 100644
--- a/tests/typ/compiler/show-text.typ
+++ b/tests/typ/compiler/show-text.typ
@@ -26,6 +26,19 @@ AA (8)
Treeworld, the World of worlds, is a world.
---
+// Test there is no crashing on empty strings
+// Error: 1:7-1:9 text selector is empty
+#show "": []
+
+---
+// Error: 1:7-1:16 regex selector is empty
+#show regex(""): [AA]
+
+---
+// Error: 1:7-1:42 regex matches empty text
+#show regex("(VAR_GLOBAL|END_VAR||BOOL)") : []
+
+---
// This is a fun one.
#set par(justify: true)
#show regex("\S"): letter => box(stroke: 1pt, inset: 2pt, upper(letter))