Gabor Szabo <[email protected]> writes:
> For this it is enough to run
>
> system "path/to/utitlity < in.txt > out.txt 2> err.txt"
>
> and then compare them to the expected.out and expected.err
Not what you're asking for, but when I see testing stdout and stderr
from child processes, I cannot resist ...
use Test::More tests => 2;
use Test::Trap qw( :output(systemsafe) );
trap { system "path/to/utitlity < in.txt" };
$trap->stdout_like( qr/for real!/, 'Got a matching STDOUT' );
$trap->stderr_is( '', 'Got no STDERR' );
:-)
(Now, if I could just whip up some support for systemsafe input as
well ...)
Eirik
--
An honest newspaper publishes corrections on the front page.
There are no honest newspapers.
- Dr. Newton, Dean of Journalism, NAU.