mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-15 05:54:25 +00:00
plate-test: app-neutral print color scenes, checked by PDF structure and Ghostscript plates
craft-plate-test writes JSON scenes through craft-pdf and checks the written PDF's structure (CI, under a second) and, locally only, its separated plates through Ghostscript tiffsep (scripts/plate-check.sh). Apps can run the same scenes through their own export as a dev-dependency.
This commit is contained in:
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
# Separate every plate-test scene with Ghostscript (local only, never CI) and judge the plates.
|
||||
# Ghostscript is `gs` on PATH, or CRAFT_PLATE_TEST_GS.
|
||||
set -euo pipefail
|
||||
root=$(cd "$(dirname "$0")/.." && pwd)
|
||||
fonts="${XDG_CACHE_HOME:-$HOME/.cache}/craft-pdf-test-fonts"
|
||||
if [[ -z "${CRAFT_PDF_TEST_FONT_DIR:-}" && -f "$fonts/Inter-Regular.ttf" ]]; then
|
||||
export CRAFT_PDF_TEST_FONT_DIR="$fonts"
|
||||
fi
|
||||
cd "$root"
|
||||
cargo test -p craft-plate-test --test ghostscript -- --ignored --nocapture
|
||||
echo "report: ${CARGO_TARGET_DIR:-target}/plate-test/report.md"
|
||||
Reference in New Issue
Block a user