summaryrefslogtreecommitdiff
path: root/t/test.pl
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-04-06 20:46:47 +0000
committerNicholas Clark <nick@ccl4.org>2007-04-06 20:46:47 +0000
commit5a4a8c8bd3ab61d27d13dfb8fcc36ee12afee389 (patch)
tree844fa125b907a2e5571ccdd7afc511062f92308e /t/test.pl
parentaec42b5de439cb3c7d89350e1da2e3794909daa3 (diff)
downloadperl-5a4a8c8bd3ab61d27d13dfb8fcc36ee12afee389.tar.gz
Give accurate failure diagnostics when unlike() fails.
p4raw-id: //depot/perl@30855
Diffstat (limited to 't/test.pl')
-rw-r--r--t/test.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/test.pl b/t/test.pl
index 558466967b..37e6682e2f 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);