From 6faf3762349920e3ee031b59a8cd8076186d3546 Mon Sep 17 00:00:00 2001 From: johndumbell Date: Wed, 9 May 2018 11:35:10 +0100 Subject: [PATCH] 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. --- regression/test.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regression/test.pl b/regression/test.pl index 92639accd3f..d137e2dbb84 100755 --- a/regression/test.pl +++ b/regression/test.pl @@ -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