From: Lukas Mai Date: Mon, 18 Jun 2012 19:29:36 +0000 (+0200) Subject: fix semibroken tests X-Git-Tag: v0.06~4^2~1^2~1^2~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6c34b444e998a67cbaf7c3d2a31c347e54a52c59;p=p5sagit%2FFunction-Parameters.git fix semibroken tests --- diff --git a/t/eating_strict_error.fail b/t/eating_strict_error.fail index 8048652..ab33eee 100644 --- a/t/eating_strict_error.fail +++ b/t/eating_strict_error.fail @@ -1,3 +1,4 @@ +#!perl use strict; use Function::Parameters; @@ -9,3 +10,4 @@ fun get_record( $agent, $target_name ) { fun get_ip( $agent ) { } +'ok' diff --git a/t/eating_strict_error.t b/t/eating_strict_error.t index d9cf187..2412110 100644 --- a/t/eating_strict_error.t +++ b/t/eating_strict_error.t @@ -7,8 +7,9 @@ use strict; use Dir::Self; -for my $thing (map [__DIR__ . "/eating_strict_error$_->[0].fail", @$_[1 .. $#$_]], ['', 5], ['_2', 8]) { +for my $thing (map [__DIR__ . "/eating_strict_error$_->[0].fail", @$_[1 .. $#$_]], ['', 6], ['_2', 9]) { my ($file, $line) = @$thing; + $@ = undef; my $done = do $file; my $exc = $@; my $err = $!; diff --git a/t/eating_strict_error_2.fail b/t/eating_strict_error_2.fail index 22cdfcf..590c5c6 100644 --- a/t/eating_strict_error_2.fail +++ b/t/eating_strict_error_2.fail @@ -1,3 +1,4 @@ +#!perl use strict; use Function::Parameters; @@ -9,3 +10,4 @@ fun get_record( $agent, $target_name ) { } } +'ok' diff --git a/t/strict.t b/t/strict.t index 4ebc8d8..a58183d 100644 --- a/t/strict.t +++ b/t/strict.t @@ -13,6 +13,7 @@ for my $fail ( ['4', qr/expect.*\).*after.*"\@y".*"\@z"/], ) { my ($file, $pat) = @$fail; + $@ = undef; my $done = do $file; my $exc = $@; my $err = $!; diff --git a/t/strict_1.fail b/t/strict_1.fail index 6a9cfcd..0d89714 100644 --- a/t/strict_1.fail +++ b/t/strict_1.fail @@ -5,3 +5,5 @@ use strict; use Function::Parameters; fun bad_1($x, @y, $z) {} + +'ok' diff --git a/t/strict_2.fail b/t/strict_2.fail index edbc47b..bcd57cb 100644 --- a/t/strict_2.fail +++ b/t/strict_2.fail @@ -5,3 +5,5 @@ use strict; use Function::Parameters; fun bad_2(@x, $y) {} + +'ok' diff --git a/t/strict_3.fail b/t/strict_3.fail index 3560b99..b065e18 100644 --- a/t/strict_3.fail +++ b/t/strict_3.fail @@ -5,3 +5,5 @@ use strict; use Function::Parameters; fun bad_3($x, %y, $z) {} + +'ok' diff --git a/t/strict_4.fail b/t/strict_4.fail index 203afd5..dbfff82 100644 --- a/t/strict_4.fail +++ b/t/strict_4.fail @@ -5,3 +5,5 @@ use strict; use Function::Parameters; fun bad_4(@y, @z) {} + +'ok'