From: Nicholas Clark Date: Sat, 1 Apr 2006 23:09:34 +0000 (+0000) Subject: Test no mypragma; X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2643c356d476bba4855af68cf482bbe89f58d68d;p=p5sagit%2Fp5-mst-13.2.git Test no mypragma; p4raw-id: //depot/perl@27667 --- diff --git a/t/lib/mypragma.t b/t/lib/mypragma.t index a4c1177..bd44cad 100644 --- a/t/lib/mypragma.t +++ b/t/lib/mypragma.t @@ -7,7 +7,7 @@ BEGIN { use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 13; use mypragma (); # don't enable this pragma yet @@ -25,6 +25,17 @@ is(mypragma::in_effect(), undef, "pragma not in effect yet"); is(mypragma::in_effect(), 1, "pragma is in effect within this block"); eval qq{is(mypragma::in_effect(), 1, "pragma is in effect within this eval"); 1} or die $@; + + { + no mypragma; + is(mypragma::in_effect(), 0, "pragma no longer in effect"); + eval qq{is(mypragma::in_effect(), 0, "pragma no longer in effect"); 1} + or die $@; + } + + is(mypragma::in_effect(), 1, "pragma is in effect within this block"); + eval qq{is(mypragma::in_effect(), 1, + "pragma is in effect within this eval"); 1} or die $@; } is(mypragma::in_effect(), undef, "pragma no longer in effect"); eval qq{is(mypragma::in_effect(), undef, "pragma not in effect"); 1} or die $@;