summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-03-12 18:48:11 +0100
committerLaurenz <laurmaedje@gmail.com>2021-03-12 18:48:11 +0100
commit1584b09708a81a96f52b20a29dfb36c04d6e71ab (patch)
treeb192df82590f9718658d152607e75d8ae3d9e73a /tests
parentc3acb491e38d333acff6897479f7dd9c86fba307 (diff)
Fix pagebreak-in-box bug ✔
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/library/shapes.pngbin2510 -> 3266 bytes
-rw-r--r--tests/typ/library/shapes.typ17
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/ref/library/shapes.png b/tests/ref/library/shapes.png
index 2804f8e9..8ace6fd6 100644
--- a/tests/ref/library/shapes.png
+++ b/tests/ref/library/shapes.png
Binary files differ
diff --git a/tests/typ/library/shapes.typ b/tests/typ/library/shapes.typ
index ceaa0148..efb68edf 100644
--- a/tests/typ/library/shapes.typ
+++ b/tests/typ/library/shapes.typ
@@ -21,3 +21,20 @@ Sometimes there is no box.
#box(width: 0.5in, height: 10pt, color: #D6CD67)
#box(width: 0.5in, height: 10pt, color: #EDD466)
#box(width: 0.5in, height: 10pt, color: #E3BE62)
+
+---
+// Make sure that you can't do page related stuff in a box.
+A
+#box[
+ B
+ // Error: 16 cannot modify page from here
+ #pagebreak()
+
+ // Error: 11-15 cannot modify page from here
+ #page("a4")
+]
+C
+
+// No consequences from the page("A4") call here.
+#pagebreak()
+D