diff options
author | Karl Williamson <khw@cpan.org> | 2015-09-11 12:37:27 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2016-01-30 10:21:51 -0700 |
commit | d9a72bf2e96ce4f217a832a9106c027edfdc45f3 (patch) | |
tree | c1d8f38d42381ae8f458e5e2c3230b55cb77526c /t | |
parent | f9db5646e816727d97154936268e7997619e06eb (diff) | |
download | perl-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.pl | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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); |