summaryrefslogtreecommitdiff
path: root/tests/suite/layout
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-08-16 11:18:45 +0200
committerGitHub <noreply@github.com>2024-08-16 09:18:45 +0000
commitfeb0c913954d385a3f906f9d9d8ec33cbcf2b2d0 (patch)
treedb593c2523c5333512aff7981cbc7dd70af14021 /tests/suite/layout
parent4853726e5b55ea5861566e850db3e6260879d9f8 (diff)
Move paragraph widow and orphan prevention into flow (#4767)
Diffstat (limited to 'tests/suite/layout')
-rw-r--r--tests/suite/layout/flow/orphan.typ11
-rw-r--r--tests/suite/layout/grid/headers.typ2
2 files changed, 12 insertions, 1 deletions
diff --git a/tests/suite/layout/flow/orphan.typ b/tests/suite/layout/flow/orphan.typ
index 70eac731..bd938d96 100644
--- a/tests/suite/layout/flow/orphan.typ
+++ b/tests/suite/layout/flow/orphan.typ
@@ -29,3 +29,14 @@ This is the start and it goes on.
// All three lines go to the next page.
#set text(olive)
#lorem(10)
+
+--- flow-widow-forced ---
+// Ensure that a widow is allowed when the three lines don't all fit.
+#set page(height: 50pt)
+#lorem(10)
+
+--- issue-1445-widow-orphan-unnecessary-skip ---
+// Ensure that widow/orphan prevention doesn't unnecessarily move things
+// to another page.
+#set page(width: 16cm)
+#block(height: 30pt, fill: aqua, columns(2, lorem(19)))
diff --git a/tests/suite/layout/grid/headers.typ b/tests/suite/layout/grid/headers.typ
index c9c95e13..c3b92997 100644
--- a/tests/suite/layout/grid/headers.typ
+++ b/tests/suite/layout/grid/headers.typ
@@ -220,7 +220,7 @@
--- grid-header-lack-of-space ---
// Test lack of space for header + text.
-#set page(height: 9em)
+#set page(height: 8em)
#table(
rows: (auto, 2.5em, auto, auto, 10em),