diff options
Diffstat (limited to 'tests/typ')
| -rw-r--r-- | tests/typ/utility/csv.typ | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/typ/utility/csv.typ b/tests/typ/utility/csv.typ new file mode 100644 index 00000000..ab955ab0 --- /dev/null +++ b/tests/typ/utility/csv.typ @@ -0,0 +1,15 @@ +// Test reading structured CSV data. + +--- +#set page(width: auto) +#let data = csv("/res/zoo.csv") +#let cells = data(0).map(strong) + data.slice(1).flatten() +#table(columns: data(0).len(), ..cells) + +--- +// Error: 6-16 file not found (searched at typ/utility/nope.csv) +#csv("nope.csv") + +--- +// Error: 6-20 failed to load csv file (CSV error: record 2 (line: 3, byte: 8): found record with 3 fields, but the previous record has 2 fields) +#csv("/res/bad.csv") |
