On Fri, Sep 19, 2008 at 03:35:36PM -0500, brian d foy wrote: > In article <[EMAIL PROTECTED]>, Nicholas Clark > <[EMAIL PROTECTED]> wrote: > > > But it seems that this bug is only fixed as a side effect of that change, > > and > > it's not actually tested for. What's the best way to write a test that fits > > within the current frameworks to prevent any regression? > > It's not obvious to me how to make use_ok() test for failure. > > Are you looking for Test::Builder::Tester?
Not sure. > #!perl > > use Test::More tests=>1; > use Test::Builder::Tester; > > test_out('not ok 1 - use Fcntl;'); > test_fail(+1); > use_ok 'Fcntl', 'Pie'; that needs to be in a BEGIN block > test_test( "Fails for bad export"); > __END__ Yes, but I then need it to do that with perl invoked with -c, and $ENV{HARNESS_ACTIVE}=1 I think that this might be a job for system()... Nicholas Clark