24 lines
1.1 KiB
Bash
Executable File
24 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Check the independent Typst plugins and their source-faithful publication.
|
|
set -euo pipefail
|
|
cd "$(dirname "${BASH_SOURCE[0]}")/.."
|
|
for command in git typst python3 pdfinfo pdftotext pdftoppm; do
|
|
command -v "$command" >/dev/null 2>&1 || { echo "Missing test dependency: $command" >&2; exit 1; }
|
|
done
|
|
for component in reporter reports/plugins/diagnostics reports; do
|
|
"$component/tests/test.sh"
|
|
done
|
|
work=$(mktemp -d "${TMPDIR:-/tmp}/beffroi-check.XXXXXXXX")
|
|
trap 'rm -rf -- "$work"' EXIT
|
|
scripts/workflow.sh all \
|
|
reports/plugins/diagnostics/tests/fixtures/legacy/windiagnostics-v1.json \
|
|
reports/plugins/diagnostics/tests/fixtures/legacy \
|
|
"$work/workflow" 2026-09-15T12:00:00Z
|
|
cp scripts/check-diagnostic.typ "$work/workflow/check-diagnostic.typ"
|
|
typst eval --root "$work/workflow" --input diagnostic=diagnostic.json \
|
|
--in "$work/workflow/check-diagnostic.typ" 'query(<valid>).first().value' >/dev/null
|
|
[[ $(head -c 5 "$work/workflow/report.pdf") == '%PDF-' ]]
|
|
scripts/build-publication.sh "$work/publication"
|
|
python3 scripts/check-legacy-parity.py "$work/publication"
|
|
echo 'Component checks and all 17 legacy PDF parity checks passed.'
|