in reply to Capturing stderr from a test script executed by Test::Harness::Straps

Check out Test::Output and Test::Output::Tie.
  • Comment on Re: Capturing stderr from a test script executed by Test::Harness::Straps

Replies are listed 'Best First'.
Re^2: Capturing stderr from a test script executed by Test::Harness::Straps
by DrWhy (Chaplain) on Oct 18, 2005 at 04:31 UTC
    Ah. Good advice. I will look into these.

    update: adrianh is correct. To clarify, I'm interested in capturing the stderr of the test script itself, not testing the stderr produced by the code under test.

    --DrWhy

    "If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."

Re^2: Capturing stderr from a test script executed by Test::Harness::Straps
by adrianh (Chancellor) on Oct 18, 2005 at 10:37 UTC
    Check out Test::Output and Test::Output::Tie.

    Nope. These are for testing things that output to STDERR (and other filehandles), not for capturing the STDERR output from test scripts :-)

    For the latter look at analyze() from Test::Harness::Straps and use some kind of IPC3/Run3 variant to capture STDERR. See Quiet test runner for an example.