X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F17-ctl.t;h=4235938027d07dc904d2897fa3291e4c32b9af32;hb=3091cc2c4142d43816115eb596b62fab8fa6b5c2;hp=ef1be224438280d5825de3fc9b8df7b002252d66;hpb=d67d5aa3c48466b4302b1e9be9fe31e032ca48f2;p=perl%2Fmodules%2FVariable-Magic.git 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; }