summaryrefslogtreecommitdiff
path: root/tests/typ/compute/eval-path.typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-11-25 16:10:28 +0100
committerLaurenz <laurmaedje@gmail.com>2023-11-26 19:03:21 +0100
commit85b1d1d4dd4628d1fb8901c3280cde84da450bbe (patch)
treeb69a629be9295268e071667b1587a5701f2bc7ef /tests/typ/compute/eval-path.typ
parent2f795b5c07171affa0709195a9dae3ed5c0afbeb (diff)
Rework `Vt` into `Engine`
- Moves as much data out of the `Vm` - Removes duplication with call_vm and call_vt flavours - Uses tracked chain instead of fixed int for determining max nesting depth - This means that nesting checks now generalizes to layout and realization, to detect crashing show rules and overly nested layouts
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)