From cfce7cd4d49d6349a8aac3f66f917b85adb238be Mon Sep 17 00:00:00 2001 From: bernhard Date: Thu, 10 Aug 2023 15:31:52 +0200 Subject: [PATCH] Issue #2454: fix the usage of 'any' in the body of a 'grep'. --- Kernel/System/UnitTest.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Kernel/System/UnitTest.pm b/Kernel/System/UnitTest.pm index fdfc28fbbc..396b718c4b 100644 --- a/Kernel/System/UnitTest.pm +++ b/Kernel/System/UnitTest.pm @@ -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/!} @@ -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; }