Sync test fixtures from Yoga
mainUse this script to sync test fixtures from the Yoga repository into Taffy. This is useful for ensuring Taffy's test infrastructure remains compatible with Yoga's tests.
Follow these steps to import and run the new tests:
- Clone the Yoga repository locally.
- Set the
YOGA_FIXTURE_DIRenvironment variable to the absolute path of thegentest/fixturesdirectory within your local Yoga clone. - Run the import command:
- From the
scripts/import-yoga-testsdirectory:cargo run - From the Taffy repository root:
cargo import-yoga-tests
- From the
- Manually inspect the imported files to ensure they are relevant to Taffy's implementation.
- Generate the actual tests using
cargo gentestfrom the Taffy root. - Run
cargo testto verify the new tests pass.
# Example setup and execution
export YOGA_FIXTURE_DIR="/path/to/yoga/gentest/fixtures"
cargo import-yoga-tests
cargo gentest
cargo test