diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-06-23 18:24:52 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-06-29 00:20:58 -0700 |
commit | 42440e3c68e8bafb7e2a74763360939de0fad6be (patch) | |
tree | bd0c9ea22a7370036158a0e06084d9b28418237a /dist/Safe | |
parent | 7e0f24e59bf40b2be3dc3bcf94ca24a10dac4cae (diff) | |
download | perl-42440e3c68e8bafb7e2a74763360939de0fad6be.tar.gz |
Test bug #111462, Safe + %^H + disallowed ops
Diffstat (limited to 'dist/Safe')
-rw-r--r-- | dist/Safe/t/safeops.t | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/dist/Safe/t/safeops.t b/dist/Safe/t/safeops.t index 8edb2232c9..85dc945101 100644 --- a/dist/Safe/t/safeops.t +++ b/dist/Safe/t/safeops.t @@ -40,7 +40,7 @@ while (<$fh>) { } close $fh; -plan(tests => scalar @op + 2); +plan(tests => scalar @op + 3); sub testop { my ($op, $opname, $code) = @_; @@ -81,6 +81,16 @@ foreach (@op) { ), qr/Unbalanced/, 'No Unbalanced warnings when disallowing ops'; + unlike + runperl( + switches => [ '-MSafe', '-w' ], + prog => 'Safe->new->reval(' + . 'q(BEGIN{$^H{foo}=bar};use strict), 0' + .')', + stderr => 1, + ), + qr/Unbalanced/, + 'No Unbalanced warnings when disallowing ops with %^H set'; } # things that begin with SKIP are skipped, for various reasons (notably |