From: Greg Sabino Mullane Date: Sun, 3 May 2009 12:47:17 +0000 (-0400) Subject: Fix up numbering for skips. X-Git-Tag: 2.9.0~31 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=3aac3a85e40d05443ae0b96f6068f8a597826c3a;p=check_postgres.git Fix up numbering for skips. --- diff --git a/t/99_spellcheck.t b/t/99_spellcheck.t index 2b9d9842c..a69a0aae6 100644 --- a/t/99_spellcheck.t +++ b/t/99_spellcheck.t @@ -18,7 +18,7 @@ elsif (!eval { require Text::SpellChecker; 1 }) { } else { opendir my $dir, 't' or die qq{Could not open directory 't': $!\n}; - @testfiles = map { "t/$_" } grep { /^.+\.(t|pl)$/ } readdir $dir; + @testfiles = map { "t/$_" } grep { /^.+\.(t|pl|pm)$/ } readdir $dir; closedir $dir or die qq{Could not closedir "$dir": $!\n}; plan tests => 3+@testfiles; } @@ -84,7 +84,7 @@ for my $file (qw/index.html/) { ## Now the embedded POD SKIP: { if (!eval { require Pod::Spell; 1 }) { - skip 'Need Pod::Spell to test the spelling of embedded POD', 2; + skip 'Need Pod::Spell to test the spelling of embedded POD', 1; } for my $file (qw{check_postgres.pl}) { @@ -99,7 +99,7 @@ SKIP: { ## Now the comments SKIP: { if (!eval { require File::Comments; 1 }) { - skip 'Need File::Comments to test the spelling inside comments', 4; + skip 'Need File::Comments to test the spelling inside comments', 1+@testfiles; } my $fc = File::Comments->new(); @@ -109,13 +109,12 @@ SKIP: { } for my $file (@testfiles, qw{check_postgres.pl}) { - ## Tests as well? if (! -e $file) { fail(qq{Could not find the file "$file"!}); } my $string = $fc->comments($file); if (! $string) { - fail(qq{Could not get comments from file $file}); + fail(qq{Could not get comments inside file $file}); next; } $string = join "\n" => @$string;