From: Nicholas Clark Date: Fri, 6 Apr 2007 20:46:47 +0000 (+0000) Subject: Give accurate failure diagnostics when unlike() fails. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5a4a8c8bd3ab61d27d13dfb8fcc36ee12afee389;p=p5sagit%2Fp5-mst-13.2.git Give accurate failure diagnostics when unlike() fails. p4raw-id: //depot/perl@30855 --- diff --git a/t/test.pl b/t/test.pl index 5584669..37e6682 100644 --- a/t/test.pl +++ b/t/test.pl @@ -274,7 +274,8 @@ sub like_yn ($$$@) { $pass = $got !~ /$expected/ if $flip; unless ($pass) { unshift(@mess, "# got '$got'\n", - "# expected /$expected/\n"); + $flip + ? "# expected !~ /$expected/\n" : "# expected /$expected/\n"); } local $Level = $Level + 1; _ok($pass, _where(), $name, @mess);