summaryrefslogtreecommitdiff
path: root/tests/suite
diff options
context:
space:
mode:
Diffstat (limited to 'tests/suite')
-rw-r--r--tests/suite/layout/page.typ8
-rw-r--r--tests/suite/visualize/pattern.typ16
2 files changed, 18 insertions, 6 deletions
diff --git a/tests/suite/layout/page.typ b/tests/suite/layout/page.typ
index f833af59..0e1f7729 100644
--- a/tests/suite/layout/page.typ
+++ b/tests/suite/layout/page.typ
@@ -66,7 +66,13 @@
// Test page fill.
#set page(width: 80pt, height: 40pt, fill: eastern)
#text(15pt, font: "Roboto", fill: white, smallcaps[Typst])
-#page(width: 40pt, fill: none, margin: (top: 10pt, rest: auto))[Hi]
+#page(width: 40pt, fill: auto, margin: (top: 10pt, rest: auto))[Hi]
+
+--- page-fill-none ---
+// Test disabling page fill.
+// The PNG is filled with black anyway due to the test runner.
+#set page(fill: none)
+#rect(fill: green)
--- page-margin-uniform ---
// Set all margins at once.
diff --git a/tests/suite/visualize/pattern.typ b/tests/suite/visualize/pattern.typ
index 08051ed2..b0c92efa 100644
--- a/tests/suite/visualize/pattern.typ
+++ b/tests/suite/visualize/pattern.typ
@@ -21,24 +21,30 @@
--- pattern-relative-self ---
// Test with relative set to `"self"`
#let pat(..args) = pattern(size: (30pt, 30pt), ..args)[
+ #set line(stroke: green)
#place(top + left, line(start: (0%, 0%), end: (100%, 100%), stroke: 1pt))
#place(top + left, line(start: (0%, 100%), end: (100%, 0%), stroke: 1pt))
]
#set page(fill: pat(), width: 100pt, height: 100pt)
-
-#rect(fill: pat(relative: "self"), width: 100%, height: 100%, stroke: 1pt)
+#rect(
+ width: 100%,
+ height: 100%,
+ fill: pat(relative: "self"),
+ stroke: 1pt + green,
+)
--- pattern-relative-parent ---
// Test with relative set to `"parent"`
-#let pat(..args) = pattern(size: (30pt, 30pt), ..args)[
+#let pat(fill, ..args) = pattern(size: (30pt, 30pt), ..args)[
+ #rect(width: 100%, height: 100%, fill: fill, stroke: none)
#place(top + left, line(start: (0%, 0%), end: (100%, 100%), stroke: 1pt))
#place(top + left, line(start: (0%, 100%), end: (100%, 0%), stroke: 1pt))
]
-#set page(fill: pat(), width: 100pt, height: 100pt)
+#set page(fill: pat(white), width: 100pt, height: 100pt)
-#rect(fill: pat(relative: "parent"), width: 100%, height: 100%, stroke: 1pt)
+#rect(fill: pat(none, relative: "parent"), width: 100%, height: 100%, stroke: 1pt)
--- pattern-small ---
// Tests small patterns for pixel accuracy.