From 1d6574a40b1239d596352342869235e7f33eaae8 Mon Sep 17 00:00:00 2001 From: James E Keenan Date: Wed, 27 Feb 2013 20:19:54 -0500 Subject: [PATCH] Loosen the passing requirement for a regex. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit RT #116961: Olivier Menguéreported many test failures when installing Data-Dumper v2.43 on pre-5.16.0 versions of Perl. This patch addresses only one of those issues by relaxing what is expected in a pattern match: '42' vs. 42. It doesn't matter for the test in question because what we are testing is the "annotation" of array elements with their indices. --- dist/Data-Dumper/t/indent.t | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/dist/Data-Dumper/t/indent.t b/dist/Data-Dumper/t/indent.t index dd736be..90a3be0 100644 --- a/dist/Data-Dumper/t/indent.t +++ b/dist/Data-Dumper/t/indent.t @@ -94,17 +94,9 @@ $dumpstr{ar_indent_3} = _dumptostr($dumper); isnt($dumpstr{ar_indent_2}, $dumpstr{ar_indent_3}, "On arrays, Indent(2) is different from Indent(3)"); like($dumpstr{ar_indent_3}, - qr/\#0.+'foo'.+\#1.+'42'/s, + qr/\#0.+'foo'.+\#1.+42/s, "Indent(3) annotates array elements with their indices" ); is(scalar(split("\n" => $dumpstr{ar_indent_2})) + 2, scalar(split("\n" => $dumpstr{ar_indent_3})), "Indent(3) runs 2 lines longer than Indent(2)"); - -__END__ -is($dumpstr{noindent}, $dumpstr{indent_0}, - "absence of Indent is same as Indent(0)"); -isnt($dumpstr{noindent}, $dumpstr{indent_1}, - "absence of Indent is different from Indent(1)"); -print STDERR $dumpstr{indent_0}; -print STDERR $dumpstr{ar_indent_3}; -- 2.7.4