diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-11-29 13:37:25 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-11-29 14:18:13 +0100 |
| commit | 0efe669278a5e1c3f2985eba2f3360e91159c54a (patch) | |
| tree | 502712857c48f0decb5e698257c0a96d358a436e /tests/typ/layout/repeat.typ | |
| parent | 836692e73cff0356e409a9ba5b4887b86809d4ca (diff) | |
Reorganize library and tests
Diffstat (limited to 'tests/typ/layout/repeat.typ')
| -rw-r--r-- | tests/typ/layout/repeat.typ | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/typ/layout/repeat.typ b/tests/typ/layout/repeat.typ new file mode 100644 index 00000000..13e99b51 --- /dev/null +++ b/tests/typ/layout/repeat.typ @@ -0,0 +1,39 @@ +// Test the `repeat` function. + +--- +// Test multiple repeats. +#let sections = ( + ("Introduction", 1), + ("Approach", 1), + ("Evaluation", 3), + ("Discussion", 15), + ("Related Work", 16), + ("Conclusion", 253), +) + +#for section in sections [ + #section(0) #repeat[.] #section(1) \ +] + +--- +// Test dots with RTL. +#set text(lang: "ar") +مقدمة #repeat[.] 15 + +--- +// Test empty repeat. +A #repeat[] B + +--- +// Test spaceless repeat. +A#repeat(rect(width: 2.5em, height: 1em))B + +--- +// Test single repeat in both directions. +A#repeat(rect(width: 6em, height: 0.7em))B + +#set par(align: center) +A#repeat(rect(width: 6em, height: 0.7em))B + +#set text(dir: rtl) +ريجين#repeat(rect(width: 4em, height: 0.7em))سون |
