summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2015-09-11 12:37:27 -0600
committerKarl Williamson <khw@cpan.org>2016-01-30 10:21:51 -0700
commitd9a72bf2e96ce4f217a832a9106c027edfdc45f3 (patch)
treec1d8f38d42381ae8f458e5e2c3230b55cb77526c /t
parentf9db5646e816727d97154936268e7997619e06eb (diff)
downloadperl-d9a72bf2e96ce4f217a832a9106c027edfdc45f3.tar.gz
Escape t/test.pl got vs expected strings
This is so that controls, etc. are visible. See http://nntp.perl.org/group/perl.perl5.porters/230927
Diffstat (limited to 't')
-rw-r--r--t/test.pl9
1 files changed, 7 insertions, 2 deletions
diff --git a/t/test.pl b/t/test.pl
index cda3840c60..84475ea3ee 100644
--- a/t/test.pl
+++ b/t/test.pl
@@ -452,10 +452,15 @@ sub like_yn ($$$@) {
my $pass;
$pass = $_[1] =~ /$expected/ if !$flip;
$pass = $_[1] !~ /$expected/ if $flip;
+ my $display_got = $_[1];
+ $display_got = display($display_got);
+ my $display_expected = $expected;
+ $display_expected = display($display_expected);
unless ($pass) {
- unshift(@mess, "# got '$_[1]'\n",
+ unshift(@mess, "# got '$display_got'\n",
$flip
- ? "# expected !~ /$expected/\n" : "# expected /$expected/\n");
+ ? "# expected !~ /$display_expected/\n"
+ : "# expected /$display_expected/\n");
}
local $Level = $Level + 1;
_ok($pass, _where(), $name, @mess);