p4raw-id: //depot/perl@24533
call_sv call_pv call_method eval_sv eval_pv require_pv
G_SCALAR G_ARRAY G_VOID G_DISCARD G_EVAL G_NOARGS
G_KEEPERR G_NODEBUG G_METHOD
- exception
+ exception mycroak
);
# from cop.h
OUTPUT:
RETVAL
+void
+mycroak(pv)
+ const char* pv
+ CODE:
+ Perl_croak(aTHX_ "%s", pv);
}
}
-use Test::More tests => 8;
+use Test::More tests => 9;
BEGIN { use_ok('XS::APItest') };
is($@, "boo\n");
ok(not defined $rv);
is($XS::APItest::exception_caught, 1);
+
+$rv = eval { mycroak("foobar\n") };
+is($@, "foobar\n", 'croak');