Skip to content

Commit

Permalink
Build results of 1fcc5b3 (on master)
Browse files Browse the repository at this point in the history
  • Loading branch information
kentfredric committed Sep 29, 2014
1 parent 0440ad7 commit 0acb43a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Release history for Comment-Spell-Check

0.001000 2014-09-29T17:19:13Z
0.001000 2014-09-29T17:35:40Z
- First version.

11 changes: 8 additions & 3 deletions lib/Comment/Spell/Check.pm
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,15 @@ has '_spell_command_base_args' => ( is => 'ro', lazy => 1, builder => '_build_sp
has '_spell_command_all_args' => ( is => 'ro', lazy => 1, builder => '_build_spell_command_all_args' );

sub _build_spell_command_exec {
for my $candidate (qw( spell aspell ispell hunspell )) {
return $candidate if can_run($candidate);
my @candidates = (qw( spell aspell ispell hunspell ));
for my $candidate (@candidates) {
return $candidate
if can_run($candidate);
}
croak 'Cant determine a spell checker automatically';
return croak <<"EOF";
Cant determine a spell checker automatically.
Make sure one of: @candidates are installed or configure manually.
EOF
}

sub _build_spell_command_base_args {
Expand Down
5 changes: 5 additions & 0 deletions t/basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ use Test::More;
use Comment::Spell::Check;

my $check = Comment::Spell::Check->new();
local $@;
eval { $check->spell_command; 1 } or do {
plan skip_all => "No automatic spell checker detection supported: $@";
exit;
};
my $out;
$check->set_output_string($out);
my $data = $check->parse_from_file($0);
Expand Down

0 comments on commit 0acb43a

Please sign in to comment.