It's 2009. Happy newyear
[Data-Peek.git] / t / 21_DDisplay.t
blob5853caf6add0fcb14d9487fc436e36b36fe9b1e0
1 #!/usr/bin/perl
3 use strict;
4 use warnings;
6 use Test::More tests => 9;
8 use Data::Peek;
10 is (DDisplay (undef), '', 'undef has no PV');
11 is (DDisplay (0), '', '0 has no PV');
12 is (DDisplay (\undef), '', '\undef has no PV');
13 is (DDisplay (\0), '', '\0 has no PV');
14 is (DDisplay (sub {}), '', 'code has no PV');
16 is (DDisplay (""), '""', 'empty string');
17 is (DDisplay ("a"), '"a"', '"a"');
18 is (DDisplay ("\n"), '"\n"', '"\n"');
19 if ($] < 5.008) {
20 is (DDisplay ("\x{20ac}"), '"\342\202\254"', '"\n"');
22 else {
23 is (DDisplay ("\x{20ac}"), '"\x{20ac}"', '"\n"');