summaryrefslogtreecommitdiff
path: root/tests/typ/compute/eval-path.typ
diff options
context:
space:
mode:
Diffstat (limited to 'tests/typ/compute/eval-path.typ')
-rw-r--r--tests/typ/compute/eval-path.typ18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/typ/compute/eval-path.typ b/tests/typ/compute/eval-path.typ
new file mode 100644
index 00000000..c02bdfb1
--- /dev/null
+++ b/tests/typ/compute/eval-path.typ
@@ -0,0 +1,18 @@
+// Test file loading in eval.
+
+---
+// Test absolute path.
+#eval("image(\"/files/tiger.jpg\", width: 50%)")
+
+---
+#show raw: it => eval(it.text, mode: "markup")
+
+```
+#show emph: image("/files/tiger.jpg", width: 50%)
+_Tiger!_
+```
+
+---
+// Test relative path.
+// Ref: false
+#test(eval(`"HELLO" in read("./eval-path.typ")`.text), true)