Same for libppd. It also has a test program, run by "make check", 1 program doing a lot of tests.
$ make check make[1]: Entering directory '/home/till/printing/openprinting/libppd/x' make testppd make[2]: Entering directory '/home/till/printing/openprinting/libppd/x' CC ppd/testppd.o ppd/testppd.c: In function ‘main’: ppd/testppd.c:1534:7: warning: pointer ‘filename’ may be used after ‘free’ [-Wuse-after-free] 1534 | unlink(filename); | ^~~~~~~~~~~~~~~~ ppd/testppd.c:1352:5: note: call to ‘free’ here 1352 | free(filename); | ^~~~~~~~~~~~~~ CCLD testppd make[2]: Leaving directory '/home/till/printing/openprinting/libppd/x' make check-TESTS make[2]: Entering directory '/home/till/printing/openprinting/libppd/x' make[3]: Entering directory '/home/till/printing/openprinting/libppd/x' PASS: testppd ============================================================================ Testsuite summary for libppd 2.0b3 ============================================================================ # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ make[3]: Leaving directory '/home/till/printing/openprinting/libppd/x' make[2]: Leaving directory '/home/till/printing/openprinting/libppd/x' make[1]: Leaving directory '/home/till/printing/openprinting/libppd/x' $ make testppd $ ./testppd ppdOpenFile("ppd/test.ppd"): PASS ppdFindAttr(wildcard): PASS ppdFindNextAttr(wildcard): PASS ppdFindAttr(Foo): PASS ppdFindNextAttr(Foo): PASS ppdMarkDefaults: PASS ppdEmitString (defaults): PASS ppdEmitString (custom size and string): PASS ppdGetConflicts(InputSlot=Envelope): PASS ppdConflicts(): PASS (2) ppdResolveConflicts(InputSlot=Envelope): PASS (Resolved by changing PageSize) ppdResolveConflicts(No option/choice): PASS (Resolved by changing InputSlot) ppdInstallableConflict(): PASS ppdPageSizeLimits: PASS ppdMarkOptions(media=iso-a4): PASS ppdMarkOptions(media=na_letter_8.5x11in): PASS ppdMarkOptions(media=oe_letter-fullbleed_8.5x11in): PASS ppdMarkOptions(media=A4): PASS ppdMarkOptions(media=Custom.8x10in): PASS ppdLocalizeIPPReason(text): PASS ppdLocalizeIPPReason(http): PASS ppdLocalizeIPPReason(help): PASS ppdLocalizeIPPReason(file): PASS ppdLocalizeIPPReason(fr text): PASS ppdLocalizeIPPReason(zh_TW text): PASS ppdLocalizeMarkerName(bogus): PASS ppdLocalizeMarkerName(cyan): PASS ppdLocalizeMarkerName(fr cyan): PASS ppdLocalizeMarkerName(zh_TW cyan): PASS ppdOpenFile("ppd/test2.ppd"): PASS ppdMarkDefaults: PASS ppdEmitString (defaults): PASS ppdConflicts(): PASS (1) ppdResolveConflicts(Quality=Photo): PASS (Unable to resolve) ppdResolveConflicts(No option/choice): PASS ppdResolveConflicts(loop test): PASS ppdInstallableConflict(): PASS ppdPageSizeLimits(default): PASS ppdPageSizeLimits(InputSlot=Manual): PASS ppdPageSizeLimits(Quality=Photo): PASS ppdPageSizeLimits(Quality=Photo): PASS ppdRasterExecPS("setpagedevice"): PASS ppdRasterExecPS("roll"): PASS ppdRasterExecPS("dup index"): PASS ppdRasterExecPS("%%Begin/EndFeature code"): PASS $
Same for libppd. It also has a test program, run by "make check", 1 program doing a lot of tests.
$ make check till/printing/ openprinting/ libppd/ x' till/printing/ openprinting/ libppd/ x' c:1534: 7: warning: pointer ‘filename’ may be used after ‘free’ [-Wuse-after-free] c:1352: 5: note: call to ‘free’ here till/printing/ openprinting/ libppd/ x' till/printing/ openprinting/ libppd/ x' till/printing/ openprinting/ libppd/ x' ======= ======= ======= ======= ======= ======= ======= ======= ======= ====== ======= ======= ======= ======= ======= ======= ======= ======= ======= ====== ======= ======= ======= ======= ======= ======= ======= ======= ======= ====== till/printing/ openprinting/ libppd/ x' till/printing/ openprinting/ libppd/ x' till/printing/ openprinting/ libppd/ x' "ppd/test. ppd"): PASS wildcard) : PASS (wildcard) : PASS (Foo): PASS (InputSlot= Envelope) : PASS icts(InputSlot= Envelope) : PASS (Resolved by changing PageSize) icts(No option/choice): PASS (Resolved by changing InputSlot) onflict( ): PASS media=iso- a4): PASS media=na_ letter_ 8.5x11in) : PASS media=oe_ letter- fullbleed_ 8.5x11in) : PASS media=A4) : PASS media=Custom. 8x10in) : PASS eason(text) : PASS eason(http) : PASS eason(help) : PASS eason(file) : PASS eason(fr text): PASS eason(zh_ TW text): PASS erName( bogus): PASS erName( cyan): PASS erName( fr cyan): PASS erName( zh_TW cyan): PASS "ppd/test2. ppd"): PASS icts(Quality= Photo): PASS (Unable to resolve) icts(No option/choice): PASS icts(loop test): PASS onflict( ): PASS ts(default) : PASS ts(InputSlot= Manual) : PASS ts(Quality= Photo): PASS ts(Quality= Photo): PASS ("setpagedevice "): PASS ("roll" ): PASS ("dup index"): PASS ("%%Begin/ EndFeature code"): PASS
make[1]: Entering directory '/home/
make testppd
make[2]: Entering directory '/home/
CC ppd/testppd.o
ppd/testppd.c: In function ‘main’:
ppd/testppd.
1534 | unlink(filename);
| ^~~~~~~~~~~~~~~~
ppd/testppd.
1352 | free(filename);
| ^~~~~~~~~~~~~~
CCLD testppd
make[2]: Leaving directory '/home/
make check-TESTS
make[2]: Entering directory '/home/
make[3]: Entering directory '/home/
PASS: testppd
=======
Testsuite summary for libppd 2.0b3
=======
# TOTAL: 1
# PASS: 1
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
=======
make[3]: Leaving directory '/home/
make[2]: Leaving directory '/home/
make[1]: Leaving directory '/home/
$ make testppd
$ ./testppd
ppdOpenFile(
ppdFindAttr(
ppdFindNextAttr
ppdFindAttr(Foo): PASS
ppdFindNextAttr
ppdMarkDefaults: PASS
ppdEmitString (defaults): PASS
ppdEmitString (custom size and string): PASS
ppdGetConflicts
ppdConflicts(): PASS (2)
ppdResolveConfl
ppdResolveConfl
ppdInstallableC
ppdPageSizeLimits: PASS
ppdMarkOptions(
ppdMarkOptions(
ppdMarkOptions(
ppdMarkOptions(
ppdMarkOptions(
ppdLocalizeIPPR
ppdLocalizeIPPR
ppdLocalizeIPPR
ppdLocalizeIPPR
ppdLocalizeIPPR
ppdLocalizeIPPR
ppdLocalizeMark
ppdLocalizeMark
ppdLocalizeMark
ppdLocalizeMark
ppdOpenFile(
ppdMarkDefaults: PASS
ppdEmitString (defaults): PASS
ppdConflicts(): PASS (1)
ppdResolveConfl
ppdResolveConfl
ppdResolveConfl
ppdInstallableC
ppdPageSizeLimi
ppdPageSizeLimi
ppdPageSizeLimi
ppdPageSizeLimi
ppdRasterExecPS
ppdRasterExecPS
ppdRasterExecPS
ppdRasterExecPS
$