summaryrefslogtreecommitdiff
path: root/tests
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
parent4853726e5b55ea5861566e850db3e6260879d9f8 (diff)
Move paragraph widow and orphan prevention into flow (#4767)
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/flow-widow-forced.pngbin0 -> 1453 bytes
-rw-r--r--tests/ref/grid-header-and-footer-lack-of-space.pngbin3768 -> 3985 bytes
-rw-r--r--tests/ref/grid-header-lack-of-space.pngbin3193 -> 2785 bytes
-rw-r--r--tests/ref/grid-rowspan-split-9.pngbin967 -> 965 bytes
-rw-r--r--tests/ref/issue-1445-widow-orphan-unnecessary-skip.pngbin0 -> 3549 bytes
-rw-r--r--tests/ref/issue-multiple-footnote-in-one-line.pngbin713 -> 704 bytes
-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
9 files changed, 15 insertions, 5 deletions
diff --git a/tests/ref/flow-widow-forced.png b/tests/ref/flow-widow-forced.png
new file mode 100644
index 00000000..98a953af
--- /dev/null
+++ b/tests/ref/flow-widow-forced.png
Binary files differ
diff --git a/tests/ref/grid-header-and-footer-lack-of-space.png b/tests/ref/grid-header-and-footer-lack-of-space.png
index 78705776..303c6f31 100644
--- a/tests/ref/grid-header-and-footer-lack-of-space.png
+++ b/tests/ref/grid-header-and-footer-lack-of-space.png
Binary files differ
diff --git a/tests/ref/grid-header-lack-of-space.png b/tests/ref/grid-header-lack-of-space.png
index 4d2b483f..8b222174 100644
--- a/tests/ref/grid-header-lack-of-space.png
+++ b/tests/ref/grid-header-lack-of-space.png
Binary files differ
diff --git a/tests/ref/grid-rowspan-split-9.png b/tests/ref/grid-rowspan-split-9.png
index 5346be71..8d878c28 100644
--- a/tests/ref/grid-rowspan-split-9.png
+++ b/tests/ref/grid-rowspan-split-9.png
Binary files differ
diff --git a/tests/ref/issue-1445-widow-orphan-unnecessary-skip.png b/tests/ref/issue-1445-widow-orphan-unnecessary-skip.png
new file mode 100644
index 00000000..7cd7888d
--- /dev/null
+++ b/tests/ref/issue-1445-widow-orphan-unnecessary-skip.png
Binary files differ
diff --git a/tests/ref/issue-multiple-footnote-in-one-line.png b/tests/ref/issue-multiple-footnote-in-one-line.png
index 1d8c017d..cdb83af2 100644
--- a/tests/ref/issue-multiple-footnote-in-one-line.png
+++ b/tests/ref/issue-multiple-footnote-in-one-line.png
Binary files differ
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 ---