test: increase Perl coverage with targeted gap tests#248
Merged
Conversation
Targets specific coverage gaps identified via Devel::Cover analysis: - Debug/Stream Proc handlers (processing instructions) - Expat parsestring() and parsefile() methods - ContentModel MIXED asString serialization - Namespace methods without Namespaces enabled - Parser.pm parsefile in list context - Objects style adjacent text concatenation - Security API argument validation (undef croaks) Key improvements: Expat.pm 88%→94% stmt, 93%→100% sub; Debug.pm 72%→96%; Stream.pm 86%→99%; Objects.pm 97%→100%. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #248 +/- ##
=======================================
Coverage 72.71% 72.71%
=======================================
Files 1 1
Lines 1092 1092
Branches 342 342
=======================================
Hits 794 794
Misses 74 74
Partials 224 224
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This was referenced Apr 9, 2026
toddr-bot
added a commit
that referenced
this pull request
Apr 15, 2026
The following test files were added in recent PRs but not included in MANIFEST, meaning they would be absent from the CPAN distribution tarball: - t/coverage_gaps.t (PR #248) - t/expat_xs_coverage.t (PR #249) - t/parser_api.t (PR #244) - t/stream_delimiter.t (PR #243) Also extend MANIFEST.SKIP with standard exclusions for build artifacts (blib/, *.o, *.so, *.bs, *.c), coverage data (cover_db/), and OS files (.DS_Store) to prevent future regenerations from picking up stale files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Adds
t/coverage_gaps.t— 31 targeted tests exercising previously untested code paths identified via Devel::Cover analysis.Why
Codecov was recently added (PR #247). Initial coverage showed several gaps in Perl-side code, particularly in style handlers, namespace methods without namespaces, Expat's direct parse methods, and security API validation.
How
Ran Devel::Cover locally, identified uncovered lines/branches/subs, and wrote focused tests for each gap. Key areas covered:
parsestring(),parsefile(), parsefile-reuse croak, namespace methods without Namespaces modeasStringserializationparsefile()in list context, branch coverage to 100%Coverage improvement (statement %)
Subroutine coverage reached 100% across all modules.
Testing
Full test suite passes (652 tests across 58 test files).
🤖 Generated with Claude Code
Quality Report
Changes: 1 file changed, 244 insertions(+)
Code scan: clean
Tests: passed (OK)
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline