Skip to content

Add hermetic C unit-test suite for libppd API#71

Merged
tillkamppeter merged 20 commits into
OpenPrinting:masterfrom
rkt0209:master
May 31, 2026
Merged

Add hermetic C unit-test suite for libppd API#71
tillkamppeter merged 20 commits into
OpenPrinting:masterfrom
rkt0209:master

Conversation

@rkt0209
Copy link
Copy Markdown
Contributor

@rkt0209 rkt0209 commented May 29, 2026

This PR introduces a comprehensive, hermetic C unit-test suite for the libppd public API. It adds 11 new native C unit tests alongside the pre-existing testppd framework, bringing the suite to a total of 12 passing tests.

All tests are integrated into the existing autotools make check flow, use the test-internal.h micro-framework, and embed static PPD fixtures to ensure zero runtime, network, or filesystem dependencies. Additionally, a GitHub Actions CI workflow (.github/workflows/build.yml) is included to autonomously build the project and execute this suite on ubuntu-latest.


Test Coverage

Test File Description
testppd Baseline PPD parser smoke test (pre-existing).
test_ppd_localize Tests language fallback chains and IPP reason-text lookups.
test_ppd_cache Tests cache building and IPP-keyword reverse-mapping.
test_ppd_ipp Tests PPD to printer-IPP attribute conversion and bi-directional name normalization.
test_ppd_mark Tests option marking, default resets, and conflict propagation.
test_ppd_custom Tests custom-option parameter walking and lookup functions.
test_ppd_attr Tests attribute iteration, cursor sharing, and spec-based selection.
test_ppd_page Tests variable and custom page size resolution, along with margin lookups.
test_ppd_conflicts Tests UI/Non-UI constraints and installable-option conflict resolution mechanisms.
test_ppd_emit Tests code emission, PJL preamble formatting, and the PageSize/PageRegion decision tree.
test_ppd_filter Tests filter-data setup, hardware copies/collate decisions, and orientation transforms.
test_ppd_generator Tests IPP-to-PPD generation, Make/Model sanitization, PDL detection, and resolution fallback.

Verification

  • Local make check passes perfectly (12/12).
  • GitHub Actions CI workflow is green on ubuntu-latest.

@tillkamppeter tillkamppeter merged commit 8ba873f into OpenPrinting:master May 31, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants