summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLU Jialin <luxxxlucy@gmail.com>2023-09-25 20:13:54 +0800
committerGitHub <noreply@github.com>2023-09-25 14:13:54 +0200
commit079ccd5e5b8558b177c8b583948c60d75e3f547f (patch)
treec505cfd8c04961929b0b5f03e69a43aa93ebf47b /tests
parent98e5d9750923fa05ff2ab39a55e3b48ddd5b9ed8 (diff)
Fixing the styling issues of the empty pages caused by pagebreak (#2182)
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/bugs/pagebreak-numbering.pngbin0 -> 4136 bytes
-rw-r--r--tests/ref/bugs/pagebreak-set-style.pngbin0 -> 5441 bytes
-rw-r--r--tests/typ/bugs/pagebreak-numbering.typ13
-rw-r--r--tests/typ/bugs/pagebreak-set-style.typ12
4 files changed, 25 insertions, 0 deletions
diff --git a/tests/ref/bugs/pagebreak-numbering.png b/tests/ref/bugs/pagebreak-numbering.png
new file mode 100644
index 00000000..96f047a8
--- /dev/null
+++ b/tests/ref/bugs/pagebreak-numbering.png
Binary files differ
diff --git a/tests/ref/bugs/pagebreak-set-style.png b/tests/ref/bugs/pagebreak-set-style.png
new file mode 100644
index 00000000..f81b8c2f
--- /dev/null
+++ b/tests/ref/bugs/pagebreak-set-style.png
Binary files differ
diff --git a/tests/typ/bugs/pagebreak-numbering.typ b/tests/typ/bugs/pagebreak-numbering.typ
new file mode 100644
index 00000000..d805c2c6
--- /dev/null
+++ b/tests/typ/bugs/pagebreak-numbering.typ
@@ -0,0 +1,13 @@
+// https://github.com/typst/typst/issues/2095
+// The empty page 2 should not have a page number
+
+#set page(numbering: none)
+This and next page should not be numbered
+
+#pagebreak(weak: true, to: "odd")
+
+#set page(numbering: "1")
+#counter(page).update(1)
+
+This page should
+
diff --git a/tests/typ/bugs/pagebreak-set-style.typ b/tests/typ/bugs/pagebreak-set-style.typ
new file mode 100644
index 00000000..1ac24652
--- /dev/null
+++ b/tests/typ/bugs/pagebreak-set-style.typ
@@ -0,0 +1,12 @@
+// https://github.com/typst/typst/issues/2162
+// The styles should not be applied to the pagebreak empty page,
+// it should only be applied after that.
+
+#pagebreak(to: "even") // We should now skip to page 2
+
+Some text on page 2
+
+#pagebreak(to: "even") // We should now skip to page 4
+
+#set page(fill: orange) // This sets the color of the page starting from page 4
+Some text on page 4