This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
972fc2e
)
Add tests for [perl #72340] sigtrap attempts to modify read-only thing
author
Father Chrysostomos
<sprout@cpan.org>
Fri, 24 Sep 2010 07:34:04 +0000
(
00:34
-0700)
committer
Father Chrysostomos
<sprout@cpan.org>
Fri, 24 Sep 2010 07:34:04 +0000
(
00:34
-0700)
lib/sigtrap.t
patch
|
blob
|
blame
|
history
diff --git
a/lib/sigtrap.t
b/lib/sigtrap.t
index
7e8ddef
..
0469a9a
100644
(file)
--- a/
lib/sigtrap.t
+++ b/
lib/sigtrap.t
@@
-9,7
+9,7
@@
BEGIN {
use strict;
use Config;
-plan 1
5
;
+plan 1
6
;
use_ok( 'sigtrap' );
@@
-57,6
+57,16
@@
$SIG{FAKE} = 'IGNORE';
sigtrap->import('untrapped', 'FAKE');
is( $SIG{FAKE}, 'IGNORE', 'respect existing handler set to IGNORE' );
+fresh_perl_like
+ '
+ use sigtrap "INT";
+ sub { kill "INT", $$ } -> (3)
+ ',
+ qr/\$ = main::__ANON__\(3\) called/,
+ { stderr => 1 },
+ "stack-trace does not try to modify read-only arguments"
+;
+
my $out = tie *STDOUT, 'TieOut';
$SIG{FAKE} = 'DEFAULT';
$sigtrap::Verbose = 1;