mirror of
https://github.com/typst/typst
synced 2025-05-18 02:55:28 +08:00
24 lines
626 B
Markdown
24 lines
626 B
Markdown
# Tests
|
|
|
|
Top level directory structure:
|
|
- `full`: Tests of full documents.
|
|
- `lang`: Tests for specific language features.
|
|
- `library`: Tests for specific library functions.
|
|
- `res`: Resource files used by tests.
|
|
|
|
Directory structure for each category:
|
|
- `typ`: Input files.
|
|
- `ref`: Reference images which the output is compared with to determine whether
|
|
a test passed or failed.
|
|
- `png`: PNG files produced by tests.
|
|
- `pdf`: PDF files produced by tests.
|
|
|
|
To keep things small, please optimize the reference images:
|
|
```bash
|
|
# One image
|
|
oxipng -o max path/to/image.png
|
|
|
|
# All images
|
|
oxipng -r -o max tests/*/ref
|
|
```
|