Move freetype 2 support into its own module
[imager.git] / t / x20spell.t
CommitLineData
8294bf44
TC
1#!perl -w
2use strict;
3use Test::More;
4use ExtUtils::Manifest qw(maniread);
5use File::Temp;
6eval "use Pod::Spell 1.01";
7plan skip_all => "Pod::Spell 1.01 required for spellchecking POD" if $@;
8my $manifest = maniread();
9my @pod = sort grep !/^inc/ && /\.(pm|pl|pod|PL)$/, keys %$manifest;
10plan tests => scalar(@pod);
11my @stopwords = qw/
12Imager
13Imager's
14IMAGER
15GIF
16JPEG
17PNG
18TIFF
19BMP
20SGI
21TGA
22RGB
23ICO
24PNM
25bilevel
26dpi
27Arnar
28Hrafnkelsson
29API
30paletted
31guassian
32metadata
33CPAN
34eg
35ie
36CMYK
37HSV
38CGI
39const
40varargs
41FreeType
42UTF-8
43RGBA
44postfix
45infix
46unary
50c75381
TC
47Uncategorized
48Blit
8294bf44
TC
49/;
50
51local %Pod::Wordlist::Wordlist = %Pod::Wordlist::Wordlist;
52for my $stop (@stopwords) {
53 $Pod::Wordlist::Wordlist{$stop} = 1;
54}
55
56# see for example:
57# https://bugs.launchpad.net/ubuntu/+source/aspell/+bug/71322
58$ENV{LANG} = "C";
59$ENV{LC_ALL} = "C";
60for my $file (@pod) {
61 my $check_fh = File::Temp->new;
62 my $check_filename = $check_fh->filename;
63 open POD, "< $file"
64 or die "Cannot open $file for spell check: $!\n";
65 Pod::Spell->new->parse_from_filehandle(\*POD, $check_fh);
66 close $check_fh;
67
68 my @out = `aspell list <$check_filename`;
69 unless (ok(@out == 0, "spell check $file")) {
70 chomp @out;
71 print "# $_\n" for @out;
72 print "#----\n";
73 open my $fh, "<", $check_filename;
74 while (<$fh>) {
75 chomp;
76 print "# $_\n";
77 }
78 print "#----\n";
79 }
80}