X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F35-stash.t;h=5ec42fd1f0826b7ccea1847b72b38be69435c318;hb=3644707ff79f48c935403a704459f79a908c2121;hp=ac004677e69bfa1836087af2476e8b3bd5e0a858;hpb=274cdb1b1834de4831b38d060cdd2808aa3a9549;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/35-stash.t b/t/35-stash.t index ac00467..5ec42fd 100644 --- a/t/35-stash.t +++ b/t/35-stash.t @@ -92,11 +92,19 @@ cast %Hlagh::, $wiz; }; my @calls = qw; + my (@fetch, @store); + if ("$]" >= 5.011_002 && "$]" < 5.021_004) { + @fetch = @calls; + @store = map { ($_) x 2 } @calls; + } else { + @fetch = @calls; + @store = @calls; + } is $@, "ok\n", 'stash: function calls compiled fine'; is_deeply \%mg, { - fetch => \@calls, - store => ("$]" < 5.011002 ? \@calls : [ map { ($_) x 2 } @calls ]), + fetch => \@fetch, + store => \@store, }, 'stash: function calls'; } @@ -215,8 +223,9 @@ cast %Hlagh::, $wiz; { local %mg; - my @expected_stores = map { ($_) x 2 } qw; - push @expected_stores, 'nevermentioned' if "$]" < 5.017_001; + my @expected_stores = qw; + @expected_stores = map { ($_) x 2 } @expected_stores if "$]" < 5.017_004; + push @expected_stores, 'nevermentioned' if "$]" < 5.017_001; eval q{ package Hlagh; @@ -295,7 +304,7 @@ $_ => sub { CB } qw); -my $uo_exp = "$]" < 5.011002 ? 2 : 3; +my $uo_exp = "$]" >= 5.011_002 && "$]" < 5.021_004 ? 3 : 2; $code .= ', data => sub { +{ guard => 0 } }';