From 9f3d18d43e3fe4e6987fb4dd09a8760560372dbf Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Wed, 13 Aug 2014 12:43:11 +0200 Subject: Bug 996893: Perl 5.18 and newer throw tons of warnings about deprecated modules r=dkl a=sgreen --- t/006spellcheck.t | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) (limited to 't/006spellcheck.t') diff --git a/t/006spellcheck.t b/t/006spellcheck.t index 7f17c5169..24e00242d 100644 --- a/t/006spellcheck.t +++ b/t/006spellcheck.t @@ -10,29 +10,13 @@ #Bugzilla Test 6# ####Spelling##### +use 5.10.1; +use strict; +use warnings; + use lib 't'; use Support::Files; -BEGIN { - #add the words to check here: - @evilwords = qw( - anyways - appearence - arbitary - cancelled - critera - databasa - dependan - existance - existant - paramater - refered - repsentation - suported - varsion - ); -} - # -1 because 006spellcheck.t must not be checked. use Test::More tests => scalar(@Support::Files::testitems) + scalar(@Support::Files::test_files) - 1; @@ -41,7 +25,7 @@ use Test::More tests => scalar(@Support::Files::testitems) # This will handle verbosity for us automatically. my $fh; { - local $^W = 0; # Don't complain about non-existent filehandles + no warnings qw(unopened); # Don't complain about non-existent filehandles if (-e \*Test::More::TESTOUT) { $fh = \*Test::More::TESTOUT; } elsif (-e \*Test::Builder::TESTOUT) { @@ -53,7 +37,24 @@ my $fh; my @testitems = (@Support::Files::testitems, @Support::Files::test_files); -# at last, here we actually run the test... +#add the words to check here: +my @evilwords = qw( + anyways + appearence + arbitary + cancelled + critera + databasa + dependan + existance + existant + paramater + refered + repsentation + suported + varsion +); + my $evilwordsregexp = join('|', @evilwords); foreach my $file (@testitems) { -- cgit v1.2.3-24-g4f1b