Add some tests for 'new { __PACKAGE__ }'
authorVincent Pit <vince@profvince.com>
Thu, 5 Sep 2013 14:12:11 +0000 (16:12 +0200)
committerVincent Pit <vince@profvince.com>
Thu, 5 Sep 2013 14:12:11 +0000 (16:12 +0200)
t/21-bad.t

index 8e7b5f0..c789371 100644 (file)
@@ -11,8 +11,8 @@ use warnings;
 
 my ($tests, $reports);
 BEGIN {
- $tests   = 84;
- $reports = 96;
+ $tests   = 88;
+ $reports = 100;
 }
 
 use Test::More tests => 3 * (4 * $tests + $reports) + 4;
@@ -510,3 +510,23 @@ package __PACKAGE___;
 new __PACKAGE___;
 ----
 [ 'new', '__PACKAGE___' ]
+####
+package Hurp;
+new { __PACKAGE__ }; # Hurp
+----
+[ 'new', '{' ]
+####
+package __PACKAGE_;
+new { __PACKAGE__ };
+----
+[ 'new', '{' ]
+####
+package __PACKAGE__;
+new { __PACKAGE__ };
+----
+[ 'new', '{' ]
+####
+package __PACKAGE___;
+new { __PACKAGE__ };
+----
+[ 'new', '{' ]