On 2005-03-08, Michael G Schwern <[EMAIL PROTECTED]> wrote:
>
> PS  I took a look at one of the Perl tests (pull.pl) and its needlessly
> Unix-centric making lots of shell calls which can easily be done with
> Perl, particularly rm -rf and mkdir -p (File::Path).  Best to make it
> cross-platform as early as possible, it sucks to bolt it on later.

One offender of this involves needing to test the STDERR of the binary,
which has been done like this:
 
 my $changes_out = `$DARCS changes --last 1 2>&1`;

I assume that STDERR redirection I've done is not portable. 

I just now looked at Test::Output to see if it could help with this. 

It looks like that it tests only standard error or standard out for a given 
bit of code, not both the same time. 

Hmm...maybe Test::Output just needs a new feature:

 # Because sometimes you don't care who said it. 
 stdout_or_stderr_is()


    Mark

Reply via email to