Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions lib/TAP/Parser/Scheduler.pm
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,20 @@ sub _glob_to_regexp {
}

sub _expand {
my ( $self, $name, $tests ) = @_;
my ( $self, $match_test, $tests ) = @_;
my $pattern;

my $pattern = $self->_glob_to_regexp($name);
$pattern = qr/^ $pattern $/x;
unless( ref $match_test eq 'Regexp' ){
$pattern = $self->_glob_to_regexp($match_test);
$pattern = qr/^ $pattern $/x;
} else {
$pattern = $match_test
}
my @match = ();

for ( my $ti = 0; $ti < @$tests; $ti++ ) {
if ( $tests->[$ti]->filename =~ $pattern ) {
if ( $tests->[$ti]->filename =~ $pattern ||
$tests->[$ti]->description =~ $pattern ) {
push @match, splice @$tests, $ti, 1;
$ti--;
}
Expand Down