Skip to content

Commit

Permalink
Merge pull request #2455 from RotherOSS/issue-#2454-grep_any
Browse files Browse the repository at this point in the history
Issue #2454: fix the usage of 'any'
  • Loading branch information
bschmalhofer authored Aug 10, 2023
2 parents 3487b52 + cfce7cd commit 088b4f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Kernel/System/UnitTest.pm
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ sub Run {
next SOPM_FILE unless IsArrayRefWithData( $Structure{Filelist} );

# for some reason the trailing .t is checked seperately
# so remove it here, when the patterns are set up
push @ExecuteTestPatterns,
map {s/\.t$//r}
grep {m!^scripts/test/!}
Expand Down Expand Up @@ -247,7 +248,8 @@ sub Run {
# check if only some tests are requested
if (@ExecuteTestPatterns) {
@Files = grep {
any {m/\/\Q$_\E\.t$/smx} @ExecuteTestPatterns
my $File = $_;
any { $File =~ m!/\Q$_\E\.t$!smx } @ExecuteTestPatterns
} @Files;
}

Expand Down

0 comments on commit 088b4f7

Please sign in to comment.