From: Vincent Pit Date: Sun, 24 Jun 2012 19:19:50 +0000 (+0200) Subject: Lower t/17-ctl.t's last test expectations X-Git-Tag: rt77991~5 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=3091cc2c4142d43816115eb596b62fab8fa6b5c2;p=perl%2Fmodules%2FVariable-Magic.git Lower t/17-ctl.t's last test expectations With ActivePerl, there's only one line produced by this test because of some strange interference between local *_, loading Exporter.pm and compiling '-d _'. Since this test has also been broken recently by a change in the core, it is more reliable to stop asking for the exact count of matches. This fixes RT #77991. --- diff --git a/t/17-ctl.t b/t/17-ctl.t index ef1be22..4235938 100644 --- a/t/17-ctl.t +++ b/t/17-ctl.t @@ -266,18 +266,10 @@ SKIP: skip 'No working Capture::Tiny is installed'=> $count unless $has_capture_tiny; my $output = Capture::Tiny::capture_merged(sub { run_perl <<' CODE' }); -use Variable::Magic qw; BEGIN { cast %::, wizard fetch => sub { die q[salsify] } } hlagh() +use Variable::Magic qw; BEGIN { cast %::, wizard fetch => sub { die q[raddish] } } hlagh() CODE skip 'Test code didn\'t run properly' => $count unless defined $output; - my $suffix = "\nExecution(?s:.*)"; - if ("$]" >= 5.017) { - $suffix = "(?:\nsalsify at -e line \\d+.){16}" . $suffix; - } elsif ("$]" >= 5.011_005) { - $suffix = "(?:\nsalsify at -e line \\d+.){12}" . $suffix; - } elsif ("$]" >= 5.011) { - $suffix = "(?:\nsalsify at -e line \\d+.){3}" . $suffix; - } - like $output, expect('salsify', '-e', $suffix), - 'die in free callback at compile time and not in eval string'; + like $output, qr/^(?:raddish at -e line \d+\.\n)+Execution(?s:.*)/, + 'die in free callback at compile time and not in eval string'; --$count; }