Skip to content

Commit a1b7855

Browse files
artizclaude
andcommitted
refactor: rename tests/pdf_snapshots → tests/snapshots
The snapshot baseline covers every format the PDF/image pipeline emits output for (pdf, scanned, tiff, webp, odf, latex/html-embedded images, mets…), not just PDF, so the directory name was misleading. Rename it and update pdf_conformance.sh's references. The snapshot example takes the output dir as an argument, so nothing else changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent c60ebfe commit a1b7855

92 files changed

Lines changed: 3 additions & 3 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

scripts/pdf_conformance.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
# Regenerate PDF output for the test corpus and diff it against the committed
3-
# snapshot baseline (tests/pdf_snapshots/). The pipeline is deterministic, so a
3+
# snapshot baseline (tests/snapshots/). The pipeline is deterministic, so a
44
# clean checkout should report every fixture EXACT; a non-zero diff means the
55
# output drifted. Run scripts/pdf_setup.sh first to fetch the libs/models.
66
set -euo pipefail
@@ -23,7 +23,7 @@ cargo run --release -q -p fleischwolf-pdf --example snapshot -- tests/data "$tmp
2323

2424
exact=0; drift=0; tot=0
2525
while IFS= read -r snap; do
26-
rel="${snap#tests/pdf_snapshots/}"
26+
rel="${snap#tests/snapshots/}"
2727
gen="$tmp/$rel"
2828
tot=$((tot + 1))
2929
if [ -f "$gen" ] && diff -q "$snap" "$gen" >/dev/null 2>&1; then
@@ -33,7 +33,7 @@ while IFS= read -r snap; do
3333
d=$(diff "$snap" "$gen" 2>/dev/null | grep -cE '^[<>]' || true)
3434
printf " %-55s %s\n" "$rel" "${d:-MISSING}"
3535
fi
36-
done < <(find tests/pdf_snapshots -name '*.md' | sort)
36+
done < <(find tests/snapshots -name '*.md' | sort)
3737

3838
echo "PDF snapshot conformance: $exact/$tot exact ($drift drifted)"
3939
[ "$drift" -eq 0 ]

tests/pdf_snapshots/html/sources/example_image_01.png.md renamed to tests/snapshots/html/sources/example_image_01.png.md

tests/pdf_snapshots/latex/sources/1706.03762/Figures/ModalNet-19.png.md renamed to tests/snapshots/latex/sources/1706.03762/Figures/ModalNet-19.png.md

tests/pdf_snapshots/latex/sources/1706.03762/Figures/ModalNet-20.png.md renamed to tests/snapshots/latex/sources/1706.03762/Figures/ModalNet-20.png.md

tests/pdf_snapshots/latex/sources/1706.03762/Figures/ModalNet-21.png.md renamed to tests/snapshots/latex/sources/1706.03762/Figures/ModalNet-21.png.md

tests/pdf_snapshots/latex/sources/1706.03762/Figures/ModalNet-22.png.md renamed to tests/snapshots/latex/sources/1706.03762/Figures/ModalNet-22.png.md

tests/pdf_snapshots/latex/sources/1706.03762/Figures/ModalNet-23.png.md renamed to tests/snapshots/latex/sources/1706.03762/Figures/ModalNet-23.png.md

tests/pdf_snapshots/latex/sources/1706.03762/Figures/ModalNet-32.png.md renamed to tests/snapshots/latex/sources/1706.03762/Figures/ModalNet-32.png.md

tests/pdf_snapshots/latex/sources/1706.03762/vis/anaphora_resolution2_new.pdf.md renamed to tests/snapshots/latex/sources/1706.03762/vis/anaphora_resolution2_new.pdf.md

tests/pdf_snapshots/latex/sources/1706.03762/vis/anaphora_resolution_new.pdf.md renamed to tests/snapshots/latex/sources/1706.03762/vis/anaphora_resolution_new.pdf.md

0 commit comments

Comments
 (0)