Files
craft-libs/scripts/test-pdf-backends.sh
T
dotCooCoo f94872456a linesweeper: visualize_op draws its inputs with the even-odd fill rule
The example's binary_op call uses FillRule::EvenOdd, but it drew the two
input paths without a fill-rule attribute, so SVG viewers filled them with
the nonzero default. A path with a hole wound the same way as its outer
contour was drawn solid while the operation treated the hole as empty.

The input paths now carry fill-rule="evenodd", taken from the rule the
operation uses. scripts/test-pdf-backends.sh runs the example's tests, and
README.craft.md, SOURCE.json and NOTICE record the change.
2026-11-06 23:15:38 -08:00

23 lines
1.3 KiB
Bash

#!/usr/bin/env bash
# Run transferred backend tests with the complete local patch set. Test copies
# keep Cargo's standalone lock resolution from modifying the vendored source.
set -euo pipefail
root=$(cd "$(dirname "$0")/.." && pwd)
test_root=$(mktemp -d "${TMPDIR:-/tmp}/craft-pdf-backends.XXXXXX")
trap 'rm -rf "$test_root"' EXIT
export CARGO_TARGET_DIR="${CARGO_TARGET_DIR:-$root/target}"
patches=()
for backend in hayro hayro-interpret hayro-syntax hayro-jbig2 hayro-cmap hayro-postscript; do
cp -R "$root/vendor/$backend" "$test_root/$backend"
patches+=(--config "patch.crates-io.$backend.path=\"$test_root/$backend\"")
done
for backend in hayro-syntax hayro-interpret hayro hayro-jbig2 hayro-cmap hayro-postscript; do
cargo test --manifest-path "$test_root/$backend/Cargo.toml" --lib "${patches[@]}"
done
cargo test --manifest-path "$test_root/hayro-syntax/Cargo.toml" --doc "${patches[@]}"
cargo test --manifest-path "$test_root/hayro-syntax/Cargo.toml" --lib --no-default-features --features std "${patches[@]}"
cp -R "$root/vendor/linesweeper" "$test_root/linesweeper"
cargo test --manifest-path "$test_root/linesweeper/Cargo.toml" --locked --lib --test regression
cargo test --manifest-path "$test_root/linesweeper/Cargo.toml" --locked --doc
cargo test --manifest-path "$test_root/linesweeper/Cargo.toml" --locked --example visualize_op