fix: use done_testing() without explicit test count#58
Draft
toddr-bot wants to merge 1 commit intoTux:masterfrom
Draft
fix: use done_testing() without explicit test count#58toddr-bot wants to merge 1 commit intoTux:masterfrom
toddr-bot wants to merge 1 commit intoTux:masterfrom
Conversation
Test::NoWarnings can add an extra test at END time, causing "planned N tests but ran N+1" failures when done_testing($count) is used. This happens when optional parser modules are missing and tests are skipped but Test::NoWarnings still runs its check. Replace done_testing($tests) with done_testing() across all test files, removing the now-unnecessary $tests counter variables and their manual increments. Fixes Tux#53 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.
Summary
Test::NoWarnings can add an extra test at END time, causing "planned N tests but ran N+1" failures when
done_testing($count)is used with an explicit count. This happens when optional parser modules are missing and tests are skipped, but Test::NoWarnings still runs its check.Replaces
done_testing($tests)withdone_testing()across all test files, removing the now-unnecessary$testscounter variables and their manual increments.Fixes #53
Changes
done_testing($tests)anddone_testing(N)withdone_testing()in 64 test filesmy $tests = N;declarations that are no longer needed$tests++/$tests += N/$tests -= Nincrements that tracked the count$notyetvariable in t/410_ods.t (still used for conditional test execution)Test plan
prove -b t/— all tests pass (the only failure is a pre-existing issue in t/37_merged.t unrelated to this change)Generated by Kōan /fix
Quality Report
Changes: 64 files changed, 63 insertions(+), 185 deletions(-)
Code scan: clean
Tests: failed (43 Failed, 1 test)
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline