diff options
| author | Martin Haug <mhaug@live.de> | 2022-12-29 11:49:01 +0100 |
|---|---|---|
| committer | Martin Haug <mhaug@live.de> | 2022-12-29 11:49:01 +0100 |
| commit | bc535f7b7169d9e0ef26faca108518f4005cc76c (patch) | |
| tree | 029b76a80215243420d48e0f54e5fdcc8d2869a2 /tests/typ | |
| parent | 94b90761ebbdf33686e82feb5a89f98d049c5b65 (diff) | |
`read` function
Diffstat (limited to 'tests/typ')
| -rw-r--r-- | tests/typ/compute/data.typ | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/typ/compute/data.typ b/tests/typ/compute/data.typ index c1def7d5..5a0f76c6 100644 --- a/tests/typ/compute/data.typ +++ b/tests/typ/compute/data.typ @@ -1,7 +1,20 @@ -// Test reading structured data. +// Test reading structured data and files. // Ref: false --- +// Test reading plain text files +#let data = read("../../res/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-46 file is not valid utf-8 +#let data = read("../../res/invalid-utf8.txt") + +--- // Test reading CSV data. // Ref: true #set page(width: auto) |
