test: add coverage for untested redirect operators and init subs - #293
Draft
toddr-bot wants to merge 1 commit into
Draft
test: add coverage for untested redirect operators and init subs#293toddr-bot wants to merge 1 commit into
toddr-bot wants to merge 1 commit into
Conversation
Exercise previously untested IPC::Run features: - &> redirect: captures both stdout and stderr to a single scalar - &>pipe redirect: combines stdout+stderr to a pipe filehandle - init sub: runs in child before exec, sets environment - init sub exception: die() in init propagates to parent - Filters on stderr (fd 2): filter functions applied to stderr output - Numbered fd redirect (3>): captures output from fd 3 These 16 tests cover redirect operators and features that had zero test coverage despite being fully implemented. 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
16 new tests covering redirect operators and features that had zero test coverage.
Why
Several documented IPC::Run features were never exercised by the test suite:
>&and&>pipe(combined stdout+stderr redirects)initsubs (pre-exec child callbacks) and their exception propagation3>)Without tests, regressions in these features would go undetected.
How
New test file
t/redirect_init.twith 16 tests:>&redirect (sync and async)&>piperedirect via pipe filehandleinitsubs (env propagation, exception handling)3>numbered fd redirectTesting
All 879 tests pass (16 new). Only pre-existing
t/pty.tskip (IO::Pty < 1.25).🤖 Generated with Claude Code