develooper Front page | perl.perl5.porters | Postings from August 2012

[perl #114118] TODO task, refactor t/op/die.t to use test.pl instead of making TAP by hand.

Thread Previous | Thread Next
From:
Nicholas Clark via RT
Date:
August 30, 2012 05:39
Subject:
[perl #114118] TODO task, refactor t/op/die.t to use test.pl instead of making TAP by hand.
Message ID:
rt-3.6.HEAD-11172-1346330366-354.114118-15-0@perl.org
On Thu Jul 12 23:22:22 2012, sprout wrote:
> On Thu Jul 12 22:53:42 2012, colink@perldreamer.com wrote:
> > I've been pretty confident about the other patches, but this particular 
> > refactor could use a second set of eyes to make sure that all the 
> > intricacies of the original have been maintained in the refactor.
> > 
> > For example, this test has fewer tests than the original; many of the 
> > extra tests seemed to be incidental.
> 
> I’ll admit to having read through it quickly, but I don’t see which test
> you removed.  The rest of the changes look safe to me.

It's not obvious.

What's gone is using a localised signal handler such as this:

    local $SIG{__DIE__} = sub { $_[0]->[0]++ } ; 

for this test:

eval {
    eval {
	die bless [ 7 ], "Error";
    };
    isa_ok( $@, 'Error', '$@ is an Error object' );
    die if $@;
};

Nicholas Clark


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=114118

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About