2024-02-01 15:25:24 +01:00
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
|
|
|
|
use Test::More;
|
|
|
|
use Test::Spelling;
|
|
|
|
|
|
|
|
if (!@ARGV) {
|
2024-07-01 10:18:56 +02:00
|
|
|
die "Usage: perl pod_spell_check.t module.pm stopwords.t";
|
2024-02-01 15:25:24 +01:00
|
|
|
}
|
|
|
|
|
2024-08-16 09:34:33 +02:00
|
|
|
my $stopword_filename='tests/resources/spellcheck/stopwords.txt';
|
2024-02-01 15:25:24 +01:00
|
|
|
if(defined($ARGV[1])){
|
|
|
|
$stopword_filename=$ARGV[1];
|
|
|
|
}
|
|
|
|
open(FILE, "<", $stopword_filename)
|
|
|
|
or die "Could not open $stopword_filename";
|
2024-07-01 10:18:56 +02:00
|
|
|
printf("Using dictionary: ".$stopword_filename." \n");
|
2024-02-01 15:25:24 +01:00
|
|
|
|
|
|
|
add_stopwords(<FILE>);
|
2024-07-01 10:18:56 +02:00
|
|
|
close(FILE);
|
2024-02-01 15:25:24 +01:00
|
|
|
set_spell_cmd('hunspell -l');
|
|
|
|
all_pod_files_spelling_ok($ARGV[0]);
|
2024-07-01 10:18:56 +02:00
|
|
|
|