Skip to content

Commit

Permalink
(perl #134175) tests for eval_pv rethrowing objects
Browse files Browse the repository at this point in the history
  • Loading branch information
tonycoz committed Jun 5, 2019
1 parent 0f4fe36 commit 1768639
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ext/XS-APItest/t/call.t
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use strict;

BEGIN {
require '../../t/test.pl';
plan(527);
plan(530);
use_ok('XS::APItest')
};

Expand Down Expand Up @@ -223,7 +223,10 @@ is(eval_pv('d()', 0), undef, "eval_pv('d()', 0)");
is($@, "its_dead_jim\n", "eval_pv('d()', 0) - \$@");
is(eval { eval_pv('d()', 1) } , undef, "eval { eval_pv('d()', 1) }");
is($@, "its_dead_jim\n", "eval { eval_pv('d()', 1) } - \$@");

is(eval { eval_pv(q/die $obj/, 1) }, undef,
"eval_pv die of an object");
ok(ref $@, "object thrown");
is($@, $obj, "check object rethrown");

# #3719 - check that the eval call variants handle exceptions correctly,
# and do the right thing with $@, both with and without G_KEEPERR set.
Expand Down

0 comments on commit 1768639

Please sign in to comment.