File: 03_podspell.t

package info (click to toggle)
libtest-fake-httpd-perl 0.09-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 164 kB
  • sloc: perl: 144; sh: 4; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 836 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use Test::More;
use Config ();
use File::Spec ();
eval "use Test::Spelling";
plan skip_all => "Test::Spelling is not installed." if $@;
plan skip_all => "set TEST_POD or TEST_ALL to enable this test"
    unless $ENV{TEST_POD} or $ENV{TEST_ALL};

my $spell;
for my $path (split /$Config::Config{path_sep}/ => $ENV{PATH}) {
    -x File::Spec->catfile($path => 'spell')  and $spell = 'spell',       last;
    -x File::Spec->catfile($path => 'ispell') and $spell = 'ispell -l',   last;
    -x File::Spec->catfile($path => 'aspell') and $spell = 'aspell list', last;
}
plan skip_all => "spell/ispell/aspell are not installed." unless $spell;

add_stopwords(map { split /[\s\:\-]/ } <DATA>);
set_spell_cmd($spell) if $spell;
local $ENV{LANG} = 'C';
all_pod_files_spelling_ok('lib');
__DATA__
NAKAGAWA Masaki
masaki@cpan.org
Test::Fake::HTTPD