From: Nicholas Clark Date: Mon, 13 Apr 2009 11:13:19 +0000 (+0100) Subject: TODO tests for deparsing strict, warnings as strings, and my $x if 0; X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=79289e05b884d027a94391e392968c16bf02f01b;p=p5sagit%2Fp5-mst-13.2.git TODO tests for deparsing strict, warnings as strings, and my $x if 0; --- diff --git a/ext/B/t/deparse.t b/ext/B/t/deparse.t index 6ba97d0..27e9f9e 100644 --- a/ext/B/t/deparse.t +++ b/ext/B/t/deparse.t @@ -27,7 +27,7 @@ BEGIN { require feature; feature->import(':5.10'); } -use Test::More tests => 74; +use Test::More tests => 77; use Config (); use B::Deparse; @@ -586,3 +586,24 @@ warn O_EXCL; #### # 67 tests for deparsing of blessed constant with overloaded numification warn OVERLOADED_NUMIFICATION; +#### +# TODO Only strict 'refs' currently supported +# 68 strict +no strict; +$x; +#### +# TODO Subsets of warnings could be encoded textually, rather than as bitflips. +no warnings 'deprecated'; +my $x; +#### +# TODO Better test for CPAN #33708 - the deparsed code has different behaviour +use strict; +no warnings; + +foreach (0..3) { + my $x = 2; + { + my $x if 0; + print ++$x, "\n"; + } +}