Acme-Locals
view release on metacpan or search on metacpan
t/pod-spell.t view on Meta::CPAN
= eval qq{ which("$try_this_spell") or die "no spell" }; ## no critic
if ($path_to_spell) {
$spell_type = $try_this_spell;
last SPELLCLONE;
}
}
if (! $path_to_spell) {
my $spell_programs = join q{, }, @SPELL_PROGRAMS;
plan( skip_all =>
qq{This test requires a spell program. (one of: $spell_programs). } .
qq{Please be sure it's executable and in your PATH. }
);
}
my @stopwords;
STOPWORDFILE:
for my $stopword_file (@STOPWORD_FILES) {
my $this_file = File::Spec->catfile($Bin, $stopword_file);
my $fh = FileHandle->new();
open $fh, "<$this_file"
or warn, next STOPWORDFILE; ## no critic
LINE:
for my $line (<$fh>) {
chomp $line;
next LINE if $line =~ m/^#/xms;
$line =~ s/\A \s+ //xmsg;
$line =~ s/ \s+ \z//xmsg;
push @stopwords, $line;
}
close $fh;
}
add_stopwords(@stopwords);
if ($spell_type eq 'aspell') {
$path_to_spell = "$path_to_spell list";
}
set_spell_cmd($path_to_spell);
plan( tests => scalar @POD_FILES );
for my $POD_entry (@POD_FILES) {
my $POD_file = File::Spec->catdir(@{ $POD_entry });
my $prev_dir = File::Spec->updir();
my $POD_file_path = File::Spec->catdir($Bin, $prev_dir, $POD_file);
pod_file_spelling_ok($POD_file_path, "Spelling for $POD_file");
}
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# fill-column: 78
# End:
# vim: expandtab tabstop=4 shiftwidth=4 shiftround
( run in 0.701 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )