summaryrefslogtreecommitdiff
path: root/tests/typ
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/typ
parentc3acb491e38d333acff6897479f7dd9c86fba307 (diff)
Fix pagebreak-in-box bug ✔
Diffstat (limited to 'tests/typ')
-rw-r--r--tests/typ/library/shapes.typ17
1 files changed, 17 insertions, 0 deletions
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