pdftract/crates/pdftract-libpdftract/tests/test_parse.rs
jedarden dfdfb9de79 test(pdftract-1eaxm): add distribution templates and C conformance tests
- Add Homebrew formula template (homebrew-formula.rb.erb)
- Add vcpkg port template with submission instructions
- Add C conformance test (conformance.c) with thread safety verification
- Add simple link test (simple_test.c) to verify library linkage
- Add hash test (test_hash.c) for hash API verification
- Add parse debug test (test_parse.rs) for development
- Add test fixtures (test-minimal.pdf, valid-minimal.pdf)
- Add PROVENANCE.md entry for valid-minimal.pdf

All tests pass: version, abi_version, free(NULL), hash, extract methods.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-05-23 09:20:22 -04:00

16 lines
512 B
Rust

use pdftract_core::document::parse_pdf_file;
use std::path::Path;
fn main() {
let pdf_path = Path::new("/home/coding/pdftract/tests/fixtures/valid-minimal.pdf");
match parse_pdf_file(pdf_path) {
Ok((fingerprint, catalog, pages, resolver)) => {
println!("Successfully parsed PDF");
println!("Fingerprint: {}", fingerprint);
println!("Pages: {}", pages.len());
}
Err(e) => {
println!("Failed to parse PDF: {}", e);
}
}
}