summaryrefslogtreecommitdiff
path: root/tests/library/typ/image.typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-02-17 21:30:20 +0100
committerLaurenz <laurmaedje@gmail.com>2021-02-17 21:30:20 +0100
commit2f4dc99cec1c6fa33257dea91ab3bcd99b1cbdf5 (patch)
treeeb983e54bac5ae226474bd8c5d6a29006b00ff12 /tests/library/typ/image.typ
parentdb1659a987cd240b78e45666617248d3d0cc7d64 (diff)
Refresh tests 🌊
Diffstat (limited to 'tests/library/typ/image.typ')
-rw-r--r--tests/library/typ/image.typ26
1 files changed, 11 insertions, 15 deletions
diff --git a/tests/library/typ/image.typ b/tests/library/typ/image.typ
index ced364b3..8bf972b2 100644
--- a/tests/library/typ/image.typ
+++ b/tests/library/typ/image.typ
@@ -1,39 +1,35 @@
// Test loading different image formats.
// Load an RGBA PNG image.
-#[image "res/rhino.png"]
-#[pagebreak]
+#image("res/rhino.png")
+#pagebreak()
// Load an RGB JPEG image.
-#[image "res/tiger.jpg"]
+#image("res/tiger.jpg")
// Error: 9-30 failed to load image
-#[image "path/does/not/exist"]
+#image("path/does/not/exist")
// Error: 9-30 failed to load image
-#[image "typ/image-error.typ"]
+#image("typ/image-error.typ")
---
// Test configuring the size and fitting behaviour of images.
// Fit to width of page.
-#[image "res/rhino.png"]
+#image("res/rhino.png")
// Fit to height of page.
-#[page height: 40pt][
- #[image "res/rhino.png"]
-]
+#page(height: 40pt, image("res/rhino.png"))
// Set width explicitly.
-#[image "res/rhino.png", width: 50pt]
+#image("res/rhino.png", width: 50pt)
// Set height explicitly.
-#[image "res/rhino.png", height: 50pt]
+#image("res/rhino.png", height: 50pt)
// Set width and height explicitly and force stretching.
-#[image "res/rhino.png", width: 25pt, height: 50pt]
+#image("res/rhino.png", width: 25pt, height: 50pt)
// Make sure the bounding-box of the image is correct.
-#[align bottom, right][
- #[image "res/tiger.jpg", width: 60pt]
-]
+#align(bottom, right, image("res/tiger.jpg", width: 60pt))