X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;ds=inline;f=t%2F11-args.t;h=a1018905af479f52071db03dff4b5c8e74eb4bdd;hb=01b6030b99a07b40707828c4a2ef0def5c865015;hp=eefa32eb06afa6b5beb80d9db91fe8a460af6561;hpb=ad9c7ed2b44bcd7a122d716fc7a358ae645ee6da;p=perl%2Fmodules%2FLexical-Types.git
diff --git a/t/11-args.t b/t/11-args.t
index eefa32e..a101890 100644
--- a/t/11-args.t
+++ b/t/11-args.t
@@ -10,6 +10,7 @@ use Test::More tests => 14 + 6;
sub TYPEDSCALAR {
$_[1] = (caller(0))[2];
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
Test::More::is($_[2], 'LTT', 'original type is ok');
();
}
@@ -87,7 +88,7 @@ use Test::More tests => 14 + 6;
my $expect = qr/^Invalid ARRAY reference/;
local $@;
eval q[
- use Lexical::Types as => [ qw/a b c/ ];
+ use Lexical::Types as => [ qw ];
my LTT $x;
];
like $@, $expect, 'as => array';
@@ -95,10 +96,10 @@ use Test::More tests => 14 + 6;
{
my $expect = qr/^Lexical::Types mangler should return zero, one or two scalars, but got 3/;
- diag 'This will throw two warnings' if $] >= 5.008008 and $] < 5.009;
+ diag 'This will throw two warnings' if "$]" >= 5.008008 and "$]" < 5.009;
local $@;
eval q[
- use Lexical::Types as => sub { qw/a b c/ };
+ use Lexical::Types as => sub { qw };
my LTT $x;
];
like $@, $expect, 'as => code, returning three scalars';
@@ -116,7 +117,7 @@ use Test::More tests => 14 + 6;
{
my $expect = qr/^banana at \(eval \d+\) line 2/;
- diag 'This will throw two more warnings' if $] >= 5.008008 and $] < 5.009;
+ diag 'This will throw two more warnings' if "$]" >= 5.008008 and "$]" < 5.009;
local $@;
eval q[
use Lexical::Types as => sub { die 'banana' };
@@ -126,7 +127,7 @@ use Test::More tests => 14 + 6;
}
{
- my $expect = qr/^coconut at \Q$0\E line 30/;
+ my $expect = qr/^coconut at \Q$0\E line 31/;
local $@;
eval q[
use Lexical::Types;