Skip to content

Commit bcc5211

Browse files
committed
Enable 'm' flag on regex for multi-line tests
This is a change to the multi-line match option to enable traditional regex multi-line matching. The m flag causes ^ and $ to actually match correctly on new line/carriage returns, where before the match was actually on the entire file so ^ was just beginning of file $ was the end. This also fixes a few tests' failure condition where this subtle difference wasn't noticed and '^warning: ignoring' is used.
1 parent ea0fb4e commit bcc5211

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

regression/test.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ ($$$$$$$$$)
174174
binmode $fh;
175175
my $whole_file = <$fh>;
176176
$whole_file =~ s/\r\n/\n/g;
177-
my $is_match = $whole_file =~ /$result/;
177+
my $is_match = $whole_file =~ /$result/m;
178178
$r = ($included ? !$is_match : $is_match);
179179
}
180180
else

0 commit comments

Comments
 (0)