This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Give accurate failure diagnostics when unlike() fails.
authorNicholas Clark <nick@ccl4.org>
Fri, 6 Apr 2007 20:46:47 +0000 (20:46 +0000)
committerNicholas Clark <nick@ccl4.org>
Fri, 6 Apr 2007 20:46:47 +0000 (20:46 +0000)
p4raw-id: //depot/perl@30855

t/test.pl

index 5584669..37e6682 100644 (file)
--- 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);