summaryrefslogtreecommitdiff
path: root/tests/typ/text/lorem.typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-02-16 14:43:38 +0100
committerLaurenz <laurmaedje@gmail.com>2023-02-16 14:43:38 +0100
commit67b45403975ba89150d17356dfbcad3e2ed18391 (patch)
treed7818f69fcb3922949122a98070dd5617e59897e /tests/typ/text/lorem.typ
parentf60d344621a47726da7b9fbe7163b2a3fbc3f9ff (diff)
Dissolve utility category
Diffstat (limited to 'tests/typ/text/lorem.typ')
-rw-r--r--tests/typ/text/lorem.typ32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/typ/text/lorem.typ b/tests/typ/text/lorem.typ
new file mode 100644
index 00000000..944fd5be
--- /dev/null
+++ b/tests/typ/text/lorem.typ
@@ -0,0 +1,32 @@
+// Test blind text.
+
+---
+// Test basic call.
+#lorem(19)
+
+---
+// Test custom paragraphs with user code.
+#set text(8pt)
+
+#{
+ let sentences = lorem(59)
+ .split(".")
+ .filter(s => s != "")
+ .map(s => s + ".")
+
+ let used = 0
+ for s in sentences {
+ if used < 2 {
+ used += 1
+ } else {
+ parbreak()
+ used = 0
+ }
+ s.trim()
+ [ ]
+ }
+}
+
+---
+// Error: 7-9 missing argument: number of words
+#lorem()