[Draft] Add two PoC testcases to libcupsfilters test suite (text→PDF and malformed PDF) #109
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This draft PR adds two small Proof-of-Concept testcases to
cupsfilters/test-filter-cases.txt, along with their corresponding input files incupsfilters/test_files/.The purpose of this PoC is to better understand how the libcupsfilters test harness (
testfilters) behaves for simple input→output scenarios, and to explore how we can later expand automated CI coverage using such testcases.This PR is not intended for merging yet — it is meant for discussion, feedback, and refinement of directions for future test additions.
Added Testcases
1.
text/plain → application/pdf(Positive Test)Entry added to
test-filter-cases.txt:Local Behavior (PoC-Only Test Run)
Ran:
From the log:
The output file "cupsfilters/test_files/output_files/output_text_simple.pdf" was created successfully (~1125 bytes) and appears as a valid PDF.
Conclusion:
This PoC correctly exercises the texttopdf filter and demonstrates that the test harness handles simple text→PDF transforms reliably.
2.
malformed PDF → application/pdf(Exploratory “Negative” Test)Entry added to
test-filter-cases.txt:malformed.pdf is a deliberately invalid “PDF” consisting of:
Local behavior (same PoC-only run as above)
From the log:
The output file "cupsfilters/test_files/output_files/output_malformed_should_fail.pdf" was created with size 26 bytes, i.e. essentially a direct copy of the malformed input.(although I was expecting a Ghostscript failure)
From observation I think the reason this happens:
Conclusion:
This PoC demonstrates the current behavior: malformed-PDF handling only triggers Ghostscript failures when the test requests a transformation such as PDF→PWG or PDF→PCLm.