Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 1.09 KB

File metadata and controls

26 lines (16 loc) · 1.09 KB

Testing notes

Unit and integration tests

go test ./...

assets/example.pdf

Shipped at repo root assets/example.pdf, validated by TestAssetsExamplePDF (pdf/assets_example_test.go) for open + page count. Update expected counts in that test if you replace the asset.

Manifest-driven samples (files.json)

  • Implementation: TestSampleFilesManifestAgainstReader in pdf/sample_files_test.go.
  • Plan, skip list, 017 notes, roadmap: docs/SAMPLE_FILES_TESTING.md.

Quick summary:

  • Read files.json under the manifest directory; Skip if the tree or manifest is missing.
  • Each entry: if encrypted → expect ErrEncrypted; else open + NumPages + page 0 MediaBox.
  • 017-unreadable-meta-data/unreadablemetadata.pdf: Skip (corrupt xref; cannot reliably pass full page tree; see sampleFilesManifestSkip).

.gitignore and references/

The root .gitignore may ignore references/. To run manifest tests in CI, place the corpus where sampleFilesRoot (pdf/sample_files_test.go) points, or adjust ignore rules.