diff options
author | Karl Williamson <khw@khw-desktop.(none)> | 2009-09-04 21:32:27 -0600 |
---|---|---|
committer | David Golden <dagolden@cpan.org> | 2009-09-05 07:29:50 -0400 |
commit | d5f8084ad267520d865af3650f4f82e6f7db5ac8 (patch) | |
tree | 3ca9f1e9593e4d45a2827a80d03f262bdf090bc0 /t/test.pl | |
parent | d21488d70bf398a35564d13cdc9d7ec951f35f9d (diff) | |
download | perl-d5f8084ad267520d865af3650f4f82e6f7db5ac8.tar.gz |
Output failures in an always printable form
Diffstat (limited to 't/test.pl')
-rw-r--r-- | t/test.pl | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -183,8 +183,8 @@ sub is ($$@) { } unless ($pass) { - unshift(@mess, "# got "._q($got)."\n", - "# expected "._q($expected)."\n"); + unshift(@mess, "# got "._qq($got)."\n", + "# expected "._qq($expected)."\n"); } _ok($pass, _where(), $name, @mess); } @@ -202,7 +202,7 @@ sub isnt ($$@) { } unless( $pass ) { - unshift(@mess, "# it should not be "._q($got)."\n", + unshift(@mess, "# it should not be "._qq($got)."\n", "# but it is.\n"); } _ok($pass, _where(), $name, @mess); @@ -229,8 +229,8 @@ sub cmp_ok ($$$@) { if ($got eq $expected and $type !~ tr/a-z//) { unshift @mess, "# $got - $expected = " . ($got - $expected) . "\n"; } - unshift(@mess, "# got "._q($got)."\n", - "# expected $type "._q($expected)."\n"); + unshift(@mess, "# got "._qq($got)."\n", + "# expected $type "._qq($expected)."\n"); } _ok($pass, _where(), $name, @mess); } @@ -266,8 +266,8 @@ sub within ($$$@) { if ($got eq $expected) { unshift @mess, "# $got - $expected = " . ($got - $expected) . "\n"; } - unshift@mess, "# got "._q($got)."\n", - "# expected "._q($expected)." (within "._q($range).")\n"; + unshift@mess, "# got "._qq($got)."\n", + "# expected "._qq($expected)." (within "._qq($range).")\n"; } _ok($pass, _where(), $name, @mess); } |