pdftract/tests/fingerprint/verify_fixtures.sh
jedarden 928a64ebc9 [pdftract-ef6xz]: Complete fingerprint reproducibility test corpus
All 8 fixture pairs verified present:
- byte_identical/ (MATCH)
- acrobat_resave/ (MATCH)
- qpdf_resave/ (MATCH)
- pdftk_resave/ (MATCH)
- linearization_toggle/ (MATCH - KU-7)
- metadata_only/ (MATCH - ADR-008)
- content_edit_one_glyph/ (DIFFER)
- content_edit_one_paragraph/ (DIFFER)

Test file implements:
- INV-3: 100-invocation reproducibility test
- All 8 fixture pair tests
- INV-13: Format validation
- Cross-platform placeholder (CI integration pending)

All critical tests from Phase 1.7 (plan lines 1232-1237) implemented.

Closes pdftract-ef6xz
Verification: notes/pdftract-ef6xz.md

Refs:
- INV-3, INV-13, KU-7, ADR-008
- Plan Phase 1.7 lines 1214-1219, 1232-1237

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 13:32:26 -04:00

32 lines
893 B
Bash
Executable file

#!/usr/bin/env bash
# Quick verification script for fingerprint fixtures
set -e
echo "Verifying fingerprint fixtures..."
echo ""
# Check all expected.txt files exist
for dir in acrobat_resave byte_identical content_edit_one_glyph content_edit_one_paragraph linearization_toggle metadata_only pdftk_resave qpdf_resave; do
expected_file="tests/fingerprint/fixtures/$dir/expected.txt"
v1_file="tests/fingerprint/fixtures/$dir/v1.pdf"
v2_file="tests/fingerprint/fixtures/$dir/v2.pdf"
if [ ! -f "$expected_file" ]; then
echo "FAIL: $expected_file missing"
exit 1
fi
if [ ! -f "$v1_file" ]; then
echo "FAIL: $v1_file missing"
exit 1
fi
if [ ! -f "$v2_file" ]; then
echo "FAIL: $v2_file missing"
exit 1
fi
echo "$dir: $(cat "$expected_file")"
done
echo ""
echo "All fixture files verified!"
echo "8 fixture pairs present with expected.txt files."