summaryrefslogtreecommitdiff
path: root/lib/diagnostics.t
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-07-29 13:28:21 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-07-29 13:28:21 -0700
commitd271dac932f48287a466118c20e43ff506047e81 (patch)
treec7167b3573dfe71f5c1cf321517caf9732d95d94 /lib/diagnostics.t
parent45bce001ce5dcc5df3afabba83b4ae5415f0b069 (diff)
downloadperl-d271dac932f48287a466118c20e43ff506047e81.tar.gz
diagnostics.t: Test BEGIN{die}
Diffstat (limited to 'lib/diagnostics.t')
-rw-r--r--lib/diagnostics.t12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/diagnostics.t b/lib/diagnostics.t
index 035df76c6e..b6deb2023d 100644
--- a/lib/diagnostics.t
+++ b/lib/diagnostics.t
@@ -4,7 +4,7 @@ BEGIN {
chdir '..' if -d '../pod' && -d '../t';
@INC = 'lib';
require './t/test.pl';
- plan(19);
+ plan(20);
}
BEGIN {
@@ -152,3 +152,13 @@ like runperl(
main::bar\(\) called at -e line \d+
main::foo\(\) called at -e line \d+
/, 'backtrace from multiline error';
+is runperl(@runperl_args, prog => 'BEGIN { die q _panic: gremlins_ }'),
+ << 'EOX', 'BEGIN{die} does not suppress diagnostics';
+panic: gremlins at -e line 1.
+BEGIN failed--compilation aborted at -e line 1 (#1)
+ (P) An internal error.
+
+Uncaught exception from user code:
+ panic: gremlins at -e line 1.
+ BEGIN failed--compilation aborted at -e line 1.
+EOX