typst/tests
Laurenz 3c74e4566a Faster compile times and test execution
- Optimize only dependencies, not the main crate
- Don't generate debug info
- Don't generate PDFs for all tets by default
2021-03-13 14:18:31 +01:00
..
ref Fix pagebreak-in-box bug ✔ 2021-03-12 18:48:11 +01:00
res Update coma example ⬆️ 2021-02-18 15:19:29 +01:00
typ Fix pagebreak-in-box bug ✔ 2021-03-12 18:48:11 +01:00
README.md Reorganize tests 🔀 2021-02-20 23:34:33 +01:00
typeset.rs Faster compile times and test execution 2021-03-13 14:18:31 +01:00

Tests

Directory structure

Top level directory structure:

  • 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.
  • res: Resource files used by tests.

Running the tests

# Run all tests
cargo test

# Run unit tests
cargo test --lib

# Run integration tests (the tests in this directory)
cargo test --test typeset

# Run all tests whose names contain the word `filter`
cargo test --test typeset filter

Creating new tests

To keep things small, please optimize reference images before committing them:

# One image
oxipng -o max path/to/image.png

# All images
oxipng -r -o max tests/ref