Skip to content

Commit

Permalink
Enable 'm' flag on regex for multi-line tests
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JohnDumbell committed May 11, 2018
1 parent 646cf29 commit 6faf376
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion regression/test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ ($$$$$$$$$)
binmode $fh;
my $whole_file = <$fh>;
$whole_file =~ s/\r\n/\n/g;
my $is_match = $whole_file =~ /$result/;
my $is_match = $whole_file =~ /$result/m;
$r = ($included ? !$is_match : $is_match);
}
else
Expand Down

0 comments on commit 6faf376

Please sign in to comment.