summaryrefslogtreecommitdiff
path: root/tests/typ/layout
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-05-18 00:36:11 +0200
committerLaurenz <laurmaedje@gmail.com>2021-05-18 00:36:11 +0200
commit8b58171d7ca036d71b32749286c251cc91bdd10e (patch)
tree4594ab5088edf8eec44f3bafe3fb8fecb13ac61b /tests/typ/layout
parent8d67c0ca5eb3486dde97fd281bd4a51d535c600c (diff)
Reorganize test cases
Diffstat (limited to 'tests/typ/layout')
-rw-r--r--tests/typ/layout/fixed.typ14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/typ/layout/fixed.typ b/tests/typ/layout/fixed.typ
new file mode 100644
index 00000000..bcb88fe1
--- /dev/null
+++ b/tests/typ/layout/fixed.typ
@@ -0,0 +1,14 @@
+// Test shrink-to-fit vs fixed.
+
+---
+#let right(body) = align(right, body)
+#let pad(body) = pad(left: 10pt, right: 10pt, body)
+
+// Top-level paragraph fills page, boxed paragraph only when width is fixed.
+L #right[R] \
+#rect(width: 50pt)[L #right[R]] \
+#rect[L #right[R]]
+
+// Pad inherits expansion behaviour.
+#pad[PL #right[PR]] \
+#rect(pad[PL #right[PR]])