Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 91 lines (87 sloc) 1.438 kb
8294bf4 spell checking author test
Tony Cook authored
1 #!perl -w
2 use strict;
3 use Test::More;
4 use ExtUtils::Manifest qw(maniread);
5 use File::Temp;
6 eval "use Pod::Spell 1.01";
7 plan skip_all => "Pod::Spell 1.01 required for spellchecking POD" if $@;
8 my $manifest = maniread();
9 my @pod = sort grep !/^inc/ && /\.(pm|pl|pod|PL)$/, keys %$manifest;
10 plan tests => scalar(@pod);
11 my @stopwords = qw/
2c331f9 @tonycoz [rt.cpan.org #65665] add the preload class method
authored
12 API
13 Arnar
14 BMP
15 Blit
16 CGI
fbc49db @tonycoz PNG re-work: finish up the tag documentation
authored
17 chromaticities
2c331f9 @tonycoz [rt.cpan.org #65665] add the preload class method
authored
18 CMYK
19 CPAN
20 FreeType
21 GIF
22 HSV
23 Hrafnkelsson
24 ICO
25 IMAGER
8294bf4 spell checking author test
Tony Cook authored
26 Imager
27 Imager's
28 JPEG
6d5c85a @tonycoz Merge the I/O buffering branch
authored
29 POSIX
8294bf4 spell checking author test
Tony Cook authored
30 PNG
2c331f9 @tonycoz [rt.cpan.org #65665] add the preload class method
authored
31 PNM
32 RGB
33 RGBA
8294bf4 spell checking author test
Tony Cook authored
34 SGI
fbc49db @tonycoz PNG re-work: finish up the tag documentation
authored
35 sRGB
8294bf4 spell checking author test
Tony Cook authored
36 TGA
2c331f9 @tonycoz [rt.cpan.org #65665] add the preload class method
authored
37 TIFF
38 UTF-8
39 Uncategorized
8294bf4 spell checking author test
Tony Cook authored
40 bilevel
2c331f9 @tonycoz [rt.cpan.org #65665] add the preload class method
authored
41 const
8294bf4 spell checking author test
Tony Cook authored
42 dpi
43 eg
67d441b @tonycoz [RT #65749] add pod link check test and fix the broken links
authored
44 gaussian
8294bf4 spell checking author test
Tony Cook authored
45 ie
46 infix
c18dd26 @tonycoz [rt #72369] Document the return value of the filter() method
authored
47 invocant
2c331f9 @tonycoz [rt.cpan.org #65665] add the preload class method
authored
48 metadata
49 paletted
50 postfix
51 preload
52 preloading
53 preloads
130225b @tonycoz [rt.cpan.org #56513] update filter plugins documentation
authored
54 renderer
d2549cc @tonycoz fix formatting and spelling to match the rest
authored
55 tuple
2c331f9 @tonycoz [rt.cpan.org #65665] add the preload class method
authored
56 unary
9d5ff8a @tonycoz [rt #76782] improve documentation and error reporting for missing I/O…
authored
57 unseekable
2c331f9 @tonycoz [rt.cpan.org #65665] add the preload class method
authored
58 varargs
8294bf4 spell checking author test
Tony Cook authored
59 /;
60
61 local %Pod::Wordlist::Wordlist = %Pod::Wordlist::Wordlist;
62 for my $stop (@stopwords) {
63 $Pod::Wordlist::Wordlist{$stop} = 1;
64 }
65
66 # see for example:
67 # https://bugs.launchpad.net/ubuntu/+source/aspell/+bug/71322
68 $ENV{LANG} = "C";
69 $ENV{LC_ALL} = "C";
70 for my $file (@pod) {
71 my $check_fh = File::Temp->new;
72 my $check_filename = $check_fh->filename;
73 open POD, "< $file"
74 or die "Cannot open $file for spell check: $!\n";
75 Pod::Spell->new->parse_from_filehandle(\*POD, $check_fh);
76 close $check_fh;
77
78 my @out = `aspell list <$check_filename`;
79 unless (ok(@out == 0, "spell check $file")) {
80 chomp @out;
125e883 @tonycoz include the unknown words on STDERR for spelling failures
authored
81 diag $_ for @out;
8294bf4 spell checking author test
Tony Cook authored
82 print "#----\n";
83 open my $fh, "<", $check_filename;
84 while (<$fh>) {
85 chomp;
86 print "# $_\n";
87 }
88 print "#----\n";
89 }
90 }
Something went wrong with that request. Please try again.