From 1001cbba7b16ccc4611bbee0474264bb551d1ea5 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Sat, 1 Sep 2012 23:43:00 +0200 Subject: Bug 787529: Use |use 5.10.1| everywhere r=wicked a=LpSolit --- t/002goodperl.t | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 't/002goodperl.t') diff --git a/t/002goodperl.t b/t/002goodperl.t index e691b39dd..4826c7712 100644 --- a/t/002goodperl.t +++ b/t/002goodperl.t @@ -16,7 +16,7 @@ use lib 't'; use Support::Files; -use Test::More tests => (scalar(@Support::Files::testitems) * 3); +use Test::More tests => (scalar(@Support::Files::testitems) * 4); my @testitems = @Support::Files::testitems; # get the files to test. @@ -84,6 +84,28 @@ foreach my $file (@testitems) { } } +foreach my $file (@testitems) { + my $found_use_feature = 0; + $file =~ s/\s.*$//; # nuke everything after the first space (#comment) + next if (!$file); # skip null entries + if (! open (FILE, $file)) { + ok(0,"could not open $file --WARNING"); + next; + } + while (my $file_line = ) { + if ($file_line =~ m/^\s*use 5.10.1/) { + $found_use_feature = 1; + last; + } + } + close (FILE); + if ($found_use_feature) { + ok(1,"$file requires Perl 5.10.1"); + } else { + ok(0,"$file DOES NOT require Perl 5.10.1 --WARNING"); + } +} + # Check to see that all error messages use tags (for l10n reasons.) foreach my $file (@testitems) { $file =~ s/\s.*$//; # nuke everything after the first space (#comment) -- cgit v1.2.3-24-g4f1b