summaryrefslogtreecommitdiff
path: root/tests/typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-05-29 15:45:57 +0200
committerLaurenz <laurmaedje@gmail.com>2021-05-31 22:33:40 +0200
commite023bf2ac9f5796355d9485afc16781196bf212b (patch)
tree26d4487de0c4e2d0f69182483301de867cb5fa34 /tests/typ
parent9f77f09aacd1fb0fd6138a6d16ed2755f6bfae3f (diff)
Module loading system
Detects cyclic imports and loads each module only once per compilation.
Diffstat (limited to 'tests/typ')
-rw-r--r--tests/typ/full/coma.typ2
-rw-r--r--tests/typ/library/image.typ22
-rw-r--r--tests/typ/text/bidi.typ2
3 files changed, 13 insertions, 13 deletions
diff --git a/tests/typ/full/coma.typ b/tests/typ/full/coma.typ
index 619843d7..4941fb71 100644
--- a/tests/typ/full/coma.typ
+++ b/tests/typ/full/coma.typ
@@ -46,4 +46,4 @@ von _v_ zu einem Blatt. Die Höhe des Baumes ist die Höhe der Wurzel.
// The `image` function returns a "template" value of the same type as
// the `[...]` literals.
-#align(center, image("res/graph.png", width: 75%))
+#align(center, image("../../res/graph.png", width: 75%))
diff --git a/tests/typ/library/image.typ b/tests/typ/library/image.typ
index a5737f4f..1fa128f0 100644
--- a/tests/typ/library/image.typ
+++ b/tests/typ/library/image.typ
@@ -4,35 +4,35 @@
// Test loading different image formats.
// Load an RGBA PNG image.
-#image("res/rhino.png")
+#image("../../res/rhino.png")
#pagebreak()
// Load an RGB JPEG image.
-#image("res/tiger.jpg")
+#image("../../res/tiger.jpg")
-// Error: 8-29 failed to load image
+// Error: 8-29 file not found
#image("path/does/not/exist")
-// Error: 8-29 failed to load image
-#image("typ/image-error.typ")
+// Error: 8-20 failed to load image
+#image("./font.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))
diff --git a/tests/typ/text/bidi.typ b/tests/typ/text/bidi.typ
index 44f0cc15..0d589930 100644
--- a/tests/typ/text/bidi.typ
+++ b/tests/typ/text/bidi.typ
@@ -46,4 +46,4 @@ Lריווח #h(1cm) R
// Test inline object.
#font("Noto Serif Hebrew", "EB Garamond")
#lang("he")
-קרנפיםRh#image("res/rhino.png", height: 11pt)inoחיים
+קרנפיםRh#image("../../res/rhino.png", height: 11pt)inoחיים