summaryrefslogtreecommitdiff
path: root/tests/suite
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
parent4853726e5b55ea5861566e850db3e6260879d9f8 (diff)
Move paragraph widow and orphan prevention into flow (#4767)
Diffstat (limited to 'tests/suite')
-rw-r--r--tests/suite/layout/flow/orphan.typ11
-rw-r--r--tests/suite/layout/grid/headers.typ2
-rw-r--r--tests/suite/model/footnote.typ7
3 files changed, 15 insertions, 5 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),
diff --git a/tests/suite/model/footnote.typ b/tests/suite/model/footnote.typ
index d72ca25a..99372551 100644
--- a/tests/suite/model/footnote.typ
+++ b/tests/suite/model/footnote.typ
@@ -163,11 +163,10 @@ Ref @fn
--- issue-multiple-footnote-in-one-line ---
// Test that the logic that keeps footnote entry together with
// their markers also works for multiple footnotes in a single
-// line or frame (here, there are two lines, but they are one
-// unit due to orphan prevention).
+// line.
#set page(height: 100pt)
-#v(40pt)
-A #footnote[a] \
+#v(50pt)
+A #footnote[a]
B #footnote[b]
--- issue-1433-footnote-in-list ---