From 42440e3c68e8bafb7e2a74763360939de0fad6be Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Sat, 23 Jun 2012 18:24:52 -0700 Subject: [PATCH] Test bug #111462, Safe + %^H + disallowed ops --- dist/Safe/t/safeops.t | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dist/Safe/t/safeops.t b/dist/Safe/t/safeops.t index 8edb223..85dc945 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 -- 2.7.4