diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-04-13 10:39:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-13 08:39:45 +0000 |
| commit | 020294fca9a7065d4b9cf4e677f606ebaaa29b00 (patch) | |
| tree | c0027ad22046e2726c22298461327823d6b88d53 /tests/suite/text/lorem.typ | |
| parent | 72dd79210602ecc799726fc096b078afbb47f299 (diff) | |
Better test runner (#3922)
Diffstat (limited to 'tests/suite/text/lorem.typ')
| -rw-r--r-- | tests/suite/text/lorem.typ | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/suite/text/lorem.typ b/tests/suite/text/lorem.typ new file mode 100644 index 00000000..1524e2a3 --- /dev/null +++ b/tests/suite/text/lorem.typ @@ -0,0 +1,32 @@ +// Test blind text. + +--- lorem --- +// Test basic call. +#lorem(19) + +--- lorem-pars --- +// 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() + [ ] + } +} + +--- lorem-missing-words --- +// Error: 2-9 missing argument: words +#lorem() |
