summaryrefslogtreecommitdiff
path: root/tests/typ
diff options
context:
space:
mode:
Diffstat (limited to 'tests/typ')
-rw-r--r--tests/typ/utility/strings.typ23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/typ/utility/strings.typ b/tests/typ/utility/strings.typ
new file mode 100644
index 00000000..15550f16
--- /dev/null
+++ b/tests/typ/utility/strings.typ
@@ -0,0 +1,23 @@
+// Test string functions.
+
+---
+// Test the `upper`, `lower`, and number formatting functions.
+#upper("Abc 8 def")
+
+#lower("SCREAMING MUST BE SILENCED in " + roman(1672) + " years")
+
+#for i in range(9) {
+ symbol(i)
+ [ and ]
+ roman(i)
+ [ for #i]
+ parbreak()
+}
+
+---
+// Error: 8-15 cannot convert integers greater than 3,999,999 to roman numerals
+#roman(8000000)
+
+---
+// Error: 9-11 number must not be negative
+#symbol(-1)