| 1 | use strict; |
| 2 | use warnings; |
| 3 | use Test::More; |
| 4 | BEGIN { |
| 5 | plan skip_all => 'test requires Test::Pod::Spelling::CommonMistakes' |
| 6 | unless eval q{ use Test::Pod::Spelling::CommonMistakes; 1 }; |
| 7 | plan skip_all => 'test requires YAML' |
| 8 | unless eval q{ use YAML qw( LoadFile ); 1 }; |
| 9 | }; |
| 10 | use Test::Pod::Spelling::CommonMistakes; |
| 11 | use FindBin; |
| 12 | use File::Spec; |
| 13 | |
| 14 | my $config_filename = File::Spec->catfile( |
| 15 | $FindBin::Bin, File::Spec->updir, File::Spec->updir, 'author.yml' |
| 16 | ); |
| 17 | |
| 18 | my $config; |
| 19 | $config = LoadFile($config_filename) |
| 20 | if -r $config_filename; |
| 21 | |
| 22 | plan skip_all => 'disabled' if $config->{pod_spelling_common}->{skip}; |
| 23 | |
| 24 | chdir(File::Spec->catdir($FindBin::Bin, File::Spec->updir, File::Spec->updir)); |
| 25 | |
| 26 | # TODO: test files in bin too. |
| 27 | all_pod_files_ok; |
| 28 | |
| 29 |