Skip to content

Commit 096df98

Browse files
uasiLeont
authored andcommitted
Fix File source handler to accept single extensions option
1 parent bdddcc8 commit 096df98

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Changes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Revision history for Test-Harness
77
- Avoid non-deterministic source handling, make a SourceHandler tie an
88
error. (Michael Schwern, Leon Timmermans)
99
- Fix and simplify MSWin32 colorization (Roy Ivy III)
10+
- Fix file source handler to accept single extensions option (Tomoki Aonuma)
1011
- Spelling fixes (Brian Wightman)
1112

1213
3.39 06-04-2017

lib/TAP/Parser/SourceHandler/File.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ sub can_handle {
7171
return 0.9 if $file->{lc_ext} eq '.tap';
7272

7373
if ( my $exts = $config->{extensions} ) {
74-
return 0.9 if grep { lc($_) eq $file->{lc_ext} } @$exts;
74+
my @exts = ref $exts eq 'ARRAY' ? @$exts : $exts;
75+
return 0.9 if grep { lc($_) eq $file->{lc_ext} } @exts;
7576
}
7677

7778
return 0;

0 commit comments

Comments
 (0)