From: Vincent Pit Date: Thu, 5 Sep 2013 14:12:11 +0000 (+0200) Subject: Add some tests for 'new { __PACKAGE__ }' X-Git-Tag: v0.31~1 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=6dbf3b321823741481f481326a36e7614d2346e8;p=perl%2Fmodules%2Findirect.git Add some tests for 'new { __PACKAGE__ }' --- diff --git a/t/21-bad.t b/t/21-bad.t index 8e7b5f0..c789371 100644 --- a/t/21-bad.t +++ b/t/21-bad.t @@ -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', '{' ]