summaryrefslogtreecommitdiff
path: root/tests/suite/loading/read.typ
blob: 57bfc1d5c9c4fefd7faf10e990b54bb18bb78ef4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
--- read-text ---
// Test reading plain text files
#let data = read("/assets/text/hello.txt")
#test(data, "Hello, world!\n")

--- read-file-not-found ---
// Error: 18-44 file not found (searched at assets/text/missing.txt)
#let data = read("/assets/text/missing.txt")

--- read-invalid-utf-8 ---
// Error: 18-40 failed to convert to string (file is not valid utf-8 in assets/text/bad.txt:1:1)
#let data = read("/assets/text/bad.txt")