use lib qw(. lib t);
use Config;
use Support::Files;
-use Test::More tests => scalar(@Support::Files::testitems);
+use Test::More tests => scalar(@Support::Files::testitems)
+ + scalar(@Support::Files::test_files);
BEGIN {
use_ok('Bugzilla::Constants');
ok(!$return_val, $file) or diag('--ERROR');
}
-my @testitems = @Support::Files::testitems;
+my @testitems = (@Support::Files::testitems, @Support::Files::test_files);
my $file_features = map_files_to_features();
# Test the scripts by compiling them
use Support::Templates;
use File::Spec;
-use Test::More tests => ( scalar(@Support::Files::testitems)
+use Test::More tests => (scalar(@Support::Files::testitems)
+ + scalar(@Support::Files::test_files)
+ $Support::Templates::num_actual_files) * 3;
-my @testitems = @Support::Files::testitems;
+my @testitems = (@Support::Files::testitems, @Support::Files::test_files);
for my $path (@Support::Templates::include_paths) {
push(@testitems, map(File::Spec->catfile($path, $_),
Support::Templates::find_actual_files($path)));
use lib 't';
use Support::Files;
-BEGIN { # yes the indenting is off, deal with it
-#add the words to check here:
-@evilwords = qw(
-anyways
-appearence
-arbitary
-cancelled
-critera
-databasa
-dependan
-existance
-existant
-paramater
-refered
-repsentation
-suported
-varsion
-);
-
-$testcount = scalar(@Support::Files::testitems);
+BEGIN {
+ #add the words to check here:
+ @evilwords = qw(
+ anyways
+ appearence
+ arbitary
+ cancelled
+ critera
+ databasa
+ dependan
+ existance
+ existant
+ paramater
+ refered
+ repsentation
+ suported
+ varsion
+ );
}
-use Test::More tests => $testcount;
+# -1 because 006spellcheck.t must not be checked.
+use Test::More tests => scalar(@Support::Files::testitems)
+ + scalar(@Support::Files::test_files) - 1;
# Capture the TESTOUT from Test::More or Test::Builder for printing errors.
# This will handle verbosity for us automatically.
}
}
-my @testitems = @Support::Files::testitems;
+my @testitems = (@Support::Files::testitems, @Support::Files::test_files);
# at last, here we actually run the test...
my $evilwordsregexp = join('|', @evilwords);
foreach my $file (@testitems) {
$file =~ s/\s.*$//; # nuke everything after the first space (#comment)
next if (!$file); # skip null entries
+ # Do not try to validate this file as it obviously contains a list
+ # of wrongly spelled words.
+ next if ($file eq 't/006spellcheck.t');
if (open (FILE, $file)) { # open the file for reading