summaryrefslogtreecommitdiff
path: root/tests/suite/layout/flow/place-flush.typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-09-16 16:41:18 +0200
committerGitHub <noreply@github.com>2024-09-16 14:41:18 +0000
commit16e67f8bea7e6891e954420e2e005976fb48a528 (patch)
treeb1de8e17f184d10894447a602da1722a71dd23a9 /tests/suite/layout/flow/place-flush.typ
parentdb71a178bef7f1525d732a190ac75a1a6d56f24b (diff)
Shrink tests (#4967)
Diffstat (limited to 'tests/suite/layout/flow/place-flush.typ')
-rw-r--r--tests/suite/layout/flow/place-flush.typ29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/suite/layout/flow/place-flush.typ b/tests/suite/layout/flow/place-flush.typ
new file mode 100644
index 00000000..8f55a6fd
--- /dev/null
+++ b/tests/suite/layout/flow/place-flush.typ
@@ -0,0 +1,29 @@
+--- place-flush ---
+#set page(height: 120pt)
+#let floater(align, height) = place(
+ align,
+ float: true,
+ rect(width: 100%, height: height),
+)
+
+#floater(top, 30pt)
+A
+
+#floater(bottom, 50pt)
+#place.flush()
+B // Should be on the second page.
+
+--- place-flush-figure ---
+#set page(height: 120pt)
+#let floater(align, height, caption) = figure(
+ placement: align,
+ caption: caption,
+ rect(width: 100%, height: height),
+)
+
+#floater(top, 30pt)[I]
+A
+
+#floater(bottom, 50pt)[II]
+#place.flush()
+B // Should be on the second page.