diff options
Diffstat (limited to 'tests/typ')
| -rw-r--r-- | tests/typ/coma.typ | 2 | ||||
| -rw-r--r-- | tests/typ/compiler/import.typ | 4 | ||||
| -rw-r--r-- | tests/typ/compiler/include.typ | 2 | ||||
| -rw-r--r-- | tests/typ/compiler/set.typ | 2 | ||||
| -rw-r--r-- | tests/typ/compiler/show-text.typ | 2 | ||||
| -rw-r--r-- | tests/typ/compute/data.typ | 28 | ||||
| -rw-r--r-- | tests/typ/compute/foundations.typ | 8 | ||||
| -rw-r--r-- | tests/typ/layout/grid-3.typ | 2 | ||||
| -rw-r--r-- | tests/typ/layout/pad.typ | 2 | ||||
| -rw-r--r-- | tests/typ/layout/par-bidi.typ | 2 | ||||
| -rw-r--r-- | tests/typ/layout/par-indent.typ | 4 | ||||
| -rw-r--r-- | tests/typ/layout/place-background.typ | 2 | ||||
| -rw-r--r-- | tests/typ/layout/place.typ | 2 | ||||
| -rw-r--r-- | tests/typ/layout/transform.typ | 4 | ||||
| -rw-r--r-- | tests/typ/meta/link.typ | 2 | ||||
| -rw-r--r-- | tests/typ/visualize/image.typ | 28 |
16 files changed, 48 insertions, 48 deletions
diff --git a/tests/typ/coma.typ b/tests/typ/coma.typ index 3ce86940..7ec2c410 100644 --- a/tests/typ/coma.typ +++ b/tests/typ/coma.typ @@ -21,4 +21,4 @@ Die Tiefe eines Knotens _v_ ist die Länge des eindeutigen Weges von der Wurzel zu _v_, und die Höhe von _v_ ist die Länge eines längsten (absteigenden) Weges von _v_ zu einem Blatt. Die Höhe des Baumes ist die Höhe der Wurzel. -#align(center, image("../res/graph.png", width: 75%)) +#align(center, image("/graph.png", width: 75%)) diff --git a/tests/typ/compiler/import.typ b/tests/typ/compiler/import.typ index f97b1ae0..0d40e351 100644 --- a/tests/typ/compiler/import.typ +++ b/tests/typ/compiler/import.typ @@ -69,8 +69,8 @@ --- // Some non-text stuff. -// Error: 9-30 file is not valid utf-8 -#import "../../res/rhino.png" +// Error: 9-21 file is not valid utf-8 +#import "/rhino.png" --- // Unresolved import. diff --git a/tests/typ/compiler/include.typ b/tests/typ/compiler/include.typ index a655e9f2..fa2e84c0 100644 --- a/tests/typ/compiler/include.typ +++ b/tests/typ/compiler/include.typ @@ -6,7 +6,7 @@ = Document // Include a file -#include "/typ/compiler/modules/chap1.typ" +#include "modules/chap1.typ" // Expression as a file name. #let chap2 = include "modu" + "les/chap" + "2.typ" diff --git a/tests/typ/compiler/set.typ b/tests/typ/compiler/set.typ index 39c3e613..36a42745 100644 --- a/tests/typ/compiler/set.typ +++ b/tests/typ/compiler/set.typ @@ -40,7 +40,7 @@ Hello *#x* // Test relative path resolving in layout phase. #let choice = ("monkey.svg", "rhino.png", "tiger.jpg") #set enum(numbering: n => { - let path = "../../res/" + choice.at(n - 1) + let path = "/" + choice.at(n - 1) move(dy: -0.15em, image(path, width: 1em, height: 1em)) }) diff --git a/tests/typ/compiler/show-text.typ b/tests/typ/compiler/show-text.typ index 124d2ed2..c867ff9f 100644 --- a/tests/typ/compiler/show-text.typ +++ b/tests/typ/compiler/show-text.typ @@ -54,6 +54,6 @@ World --- // Test absolute path in layout phase. -#show "GRAPH": image("/res/graph.png") +#show "GRAPH": image("/graph.png") The GRAPH has nodes. 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!_ ``` diff --git a/tests/typ/layout/grid-3.typ b/tests/typ/layout/grid-3.typ index 8194da73..ee79f2fd 100644 --- a/tests/typ/layout/grid-3.typ +++ b/tests/typ/layout/grid-3.typ @@ -23,7 +23,7 @@ columns: 4 * (1fr,), row-gutter: 10pt, column-gutter: (0pt, 10%), - align(top, image("/res/rhino.png")), + align(top, image("/rhino.png")), align(top, rect(inset: 0pt, fill: eastern, align(right)[LoL])), [rofl], [\ A] * 3, diff --git a/tests/typ/layout/pad.typ b/tests/typ/layout/pad.typ index 4f481502..2cc4d4ee 100644 --- a/tests/typ/layout/pad.typ +++ b/tests/typ/layout/pad.typ @@ -22,7 +22,7 @@ Hi #box(pad(left: 10pt)[A]) there // Test that the pad node doesn't consume the whole region. #set page(height: 6cm) #align(left)[Before] -#pad(10pt, image("/res/tiger.jpg")) +#pad(10pt, image("/tiger.jpg")) #align(right)[After] --- diff --git a/tests/typ/layout/par-bidi.typ b/tests/typ/layout/par-bidi.typ index 4baefcd3..31e3fded 100644 --- a/tests/typ/layout/par-bidi.typ +++ b/tests/typ/layout/par-bidi.typ @@ -43,7 +43,7 @@ Lריווח #h(1cm) R --- // Test inline object. #set text(lang: "he", "IBM Plex Serif") -קרנפיםRh#image("/res/rhino.png", height: 11pt)inoחיים +קרנפיםRh#image("/rhino.png", height: 11pt)inoחיים --- // Test whether L1 whitespace resetting destroys stuff. diff --git a/tests/typ/layout/par-indent.typ b/tests/typ/layout/par-indent.typ index 8454dda5..d328da41 100644 --- a/tests/typ/layout/par-indent.typ +++ b/tests/typ/layout/par-indent.typ @@ -9,10 +9,10 @@ The first paragraph has no indent. But the second one does. -#image("/res/tiger.jpg", height: 6pt) +#image("/tiger.jpg", height: 6pt) starts a paragraph without indent. -#align(center, image("/res/rhino.png", width: 1cm)) +#align(center, image("/rhino.png", width: 1cm)) = Headings - And lists. diff --git a/tests/typ/layout/place-background.typ b/tests/typ/layout/place-background.typ index fafedec1..6f480b93 100644 --- a/tests/typ/layout/place-background.typ +++ b/tests/typ/layout/place-background.typ @@ -7,7 +7,7 @@ dx: -10pt, dy: -10pt, image( - "/res/tiger.jpg", + "/tiger.jpg", fit: "cover", width: 100% + 20pt, height: 100% + 20pt, diff --git a/tests/typ/layout/place.typ b/tests/typ/layout/place.typ index 58f9d06d..18f7642d 100644 --- a/tests/typ/layout/place.typ +++ b/tests/typ/layout/place.typ @@ -5,7 +5,7 @@ #place(bottom + center)[© Typst] = Placement -#place(right, image("/res/tiger.jpg", width: 1.8cm)) +#place(right, image("/tiger.jpg", width: 1.8cm)) Hi there. This is \ a placed node. \ Unfortunately, \ diff --git a/tests/typ/layout/transform.typ b/tests/typ/layout/transform.typ index 58a053e9..cc7494b3 100644 --- a/tests/typ/layout/transform.typ +++ b/tests/typ/layout/transform.typ @@ -31,13 +31,13 @@ nor #xetex! // Test combination of scaling and rotation. #set page(height: 80pt) #align(center + horizon, - rotate(20deg, scale(70%, image("/res/tiger.jpg"))) + rotate(20deg, scale(70%, image("/tiger.jpg"))) ) --- // Test setting rotation origin. #rotate(10deg, origin: top + left, - image("/res/tiger.jpg", width: 50%) + image("/tiger.jpg", width: 50%) ) --- diff --git a/tests/typ/meta/link.typ b/tests/typ/meta/link.typ index 8c3e6ddd..4ed7e58d 100644 --- a/tests/typ/meta/link.typ +++ b/tests/typ/meta/link.typ @@ -38,7 +38,7 @@ My cool #move(dx: 0.7cm, dy: 0.7cm, rotate(10deg, scale(200%, mylink))) // Link containing a block. #link("https://example.com/", block[ My cool rhino - #move(dx: 10pt, image("/res/rhino.png", width: 1cm)) + #move(dx: 10pt, image("/rhino.png", width: 1cm)) ]) --- diff --git a/tests/typ/visualize/image.typ b/tests/typ/visualize/image.typ index 6a2c37e1..89381955 100644 --- a/tests/typ/visualize/image.typ +++ b/tests/typ/visualize/image.typ @@ -4,24 +4,24 @@ // Test loading different image formats. // Load an RGBA PNG image. -#image("/res/rhino.png") +#image("/rhino.png") // Load an RGB JPEG image. #set page(height: 60pt) -#image("../../res/tiger.jpg") +#image("/tiger.jpg") --- // Test configuring the size and fitting behaviour of images. // Set width and height explicitly. -#image("/res/rhino.png", width: 30pt) -#image("/res/rhino.png", height: 30pt) +#image("/rhino.png", width: 30pt) +#image("/rhino.png", height: 30pt) // Set width and height explicitly and force stretching. -#image("/res/monkey.svg", width: 100%, height: 20pt, fit: "stretch") +#image("/monkey.svg", width: 100%, height: 20pt, fit: "stretch") // Make sure the bounding-box of the image is correct. -#align(bottom + right, image("/res/tiger.jpg", width: 40pt)) +#align(bottom + right, image("/tiger.jpg", width: 40pt)) --- // Test all three fit modes. @@ -30,9 +30,9 @@ columns: (1fr, 1fr, 1fr), rows: 100%, gutter: 3pt, - image("/res/tiger.jpg", width: 100%, height: 100%, fit: "contain"), - image("/res/tiger.jpg", width: 100%, height: 100%, fit: "cover"), - image("/res/monkey.svg", width: 100%, height: 100%, fit: "stretch"), + image("/tiger.jpg", width: 100%, height: 100%, fit: "contain"), + image("/tiger.jpg", width: 100%, height: 100%, fit: "cover"), + image("/monkey.svg", width: 100%, height: 100%, fit: "stretch"), ) --- @@ -40,15 +40,15 @@ #set page(height: 60pt) Stuff #parbreak() Stuff -#image("/res/rhino.png") +#image("/rhino.png") --- // Test baseline. -A #image("/res/tiger.jpg", height: 1cm, width: 80%) B +A #image("/tiger.jpg", height: 1cm, width: 80%) B --- // Test advanced SVG features. -#image("/res/pattern.svg") +#image("/pattern.svg") --- // Error: 8-29 file not found (searched at typ/visualize/path/does/not/exist) @@ -59,5 +59,5 @@ A #image("/res/tiger.jpg", height: 1cm, width: 80%) B #image("./image.typ") --- -// Error: 8-22 failed to parse svg: found closing tag 'g' instead of 'style' in line 4 -#image("/res/bad.svg") +// Error: 8-18 failed to parse svg: found closing tag 'g' instead of 'style' in line 4 +#image("/bad.svg") |
