From b0b90d2593e236a97dc84f1b1119699a33e42671 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Wed, 26 Jun 2013 17:51:36 -0600 Subject: t/re/reg_mesg.t: Add diagnostic output on some failures --- t/re/reg_mesg.t | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 't') diff --git a/t/re/reg_mesg.t b/t/re/reg_mesg.t index 56c7b554d6..a7da15a478 100644 --- a/t/re/reg_mesg.t +++ b/t/re/reg_mesg.t @@ -308,7 +308,12 @@ foreach my $ref (\@warning, \@experimental_regex_sets, \@deprecated) { } } foreach my $i (0 .. $count - 1) { - if (like($got[$i], qr/\Q$expect[$i]/, "... and gave expected warning[$i]")) { + if (! like($got[$i], qr/\Q$expect[$i]/, "... and gave expected warning")) { + chomp($got[$i]); + chomp($expect[$i]); + diag("GOT\n'$got[$i]'\nEXPECT\n'$expect[$i]'"); + } + else { ok (0 == capture_warnings(sub { $_ = "x"; eval "no warnings '$warning_type'; $regex;" } -- cgit v1.2.1