summaryrefslogtreecommitdiff
path: root/tests/typ/compute
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-01-31 15:05:42 +0100
committerLaurenz <laurmaedje@gmail.com>2023-01-31 15:05:42 +0100
commitec05ed7e0646d1e8ff76677d0332ddf93ed57b69 (patch)
tree75f57cbc2380591ef6c4f30d71e018e3cd001e19 /tests/typ/compute
parent9a99beec94a5b02aa91a363b299d4795ef52c0fa (diff)
Move assets
Diffstat (limited to 'tests/typ/compute')
-rw-r--r--tests/typ/compute/data.typ28
-rw-r--r--tests/typ/compute/foundations.typ8
2 files changed, 18 insertions, 18 deletions
diff --git a/tests/typ/compute/data.typ b/tests/typ/compute/data.typ
index dc563022..d80d4857 100644
--- a/tests/typ/compute/data.typ
+++ b/tests/typ/compute/data.typ
@@ -3,22 +3,22 @@
---
// Test reading plain text files
-#let data = read("../../res/hello.txt")
+#let data = read("/hello.txt")
#test(data, "Hello, world!")
---
-// Error: 18-41 file not found (searched at res/missing.txt)
-#let data = read("../../res/missing.txt")
+// Error: 18-32 file not found (searched at /missing.txt)
+#let data = read("/missing.txt")
---
-// Error: 18-46 file is not valid utf-8
-#let data = read("../../res/invalid-utf8.txt")
+// Error: 18-37 file is not valid utf-8
+#let data = read("/invalid-utf8.txt")
---
// Test reading CSV data.
// Ref: true
#set page(width: auto)
-#let data = csv("/res/zoo.csv")
+#let data = csv("/zoo.csv")
#let cells = data.at(0).map(strong) + data.slice(1).flatten()
#table(columns: data.at(0).len(), ..cells)
@@ -27,23 +27,23 @@
#csv("nope.csv")
---
-// Error: 6-20 failed to parse csv file: found 3 instead of 2 fields in line 3
-#csv("/res/bad.csv")
+// Error: 6-16 failed to parse csv file: found 3 instead of 2 fields in line 3
+#csv("/bad.csv")
---
// Test reading JSON data.
-#let data = json("/res/zoo.json")
+#let data = json("/zoo.json")
#test(data.len(), 3)
#test(data.at(0).name, "Debby")
#test(data.at(2).weight, 150)
---
-// Error: 7-22 failed to parse json file: syntax error in line 3
-#json("/res/bad.json")
+// Error: 7-18 failed to parse json file: syntax error in line 3
+#json("/bad.json")
---
// Test reading XML data.
-#let data = xml("/res/data.xml")
+#let data = xml("/data.xml")
#test(data, ((
tag: "data",
attrs: (:),
@@ -67,5 +67,5 @@
),))
---
-// Error: 6-20 failed to parse xml file: found closing tag 'data' instead of 'hello' in line 3
-#xml("/res/bad.xml")
+// Error: 6-16 failed to parse xml file: found closing tag 'data' instead of 'hello' in line 3
+#xml("/bad.xml")
diff --git a/tests/typ/compute/foundations.typ b/tests/typ/compute/foundations.typ
index 1b2ab473..602bc22d 100644
--- a/tests/typ/compute/foundations.typ
+++ b/tests/typ/compute/foundations.typ
@@ -51,15 +51,15 @@ Blue #move(dy: -0.15em)[🌊]
#eval("#include \"../coma.typ\"")
---
-// Error: 7-35 cannot access file system from here
-#eval("#image(\"/res/tiger.jpg\")")
+// Error: 7-31 cannot access file system from here
+#eval("#image(\"/tiger.jpg\")")
---
// Error: 23-30 cannot access file system from here
#show raw: it => eval(it.text)
```
-#image("/res/tiger.jpg")
+#image("/tiger.jpg")
```
---
@@ -67,7 +67,7 @@ Blue #move(dy: -0.15em)[🌊]
#show raw: it => eval(it.text)
```
-#show emph: _ => image("../../res/giraffe.jpg")
+#show emph: _ => image("/giraffe.jpg")
_No relative giraffe!_
```