diff options
author | Simon Cozens <simon@netthink.co.uk> | 2001-05-12 18:58:41 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-25 12:24:45 +0000 |
commit | ac7cd81aae231be8bd5734f1506e627995fef570 (patch) | |
tree | 1afabad86fa3c13ab376d2b27373051baf9ff235 /t/pragma | |
parent | e66fb0c202c476a67c63915139a2545b39101339 (diff) | |
download | perl-ac7cd81aae231be8bd5734f1506e627995fef570.tar.gz |
Based on
Subject: [PATCH pp.c] Wrapping pack("C",256)
Message-ID: <20010512175841.A6132@netthink.co.uk>
p4raw-id: //depot/perl@10209
Diffstat (limited to 't/pragma')
-rw-r--r-- | t/pragma/warn/pp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/t/pragma/warn/pp b/t/pragma/warn/pp index 8f42ba64ec..62f054a6ee 100644 --- a/t/pragma/warn/pp +++ b/t/pragma/warn/pp @@ -108,3 +108,43 @@ $_ = "\x80 \xff" ; reverse ; EXPECT ######## +# pp.c +use warnings 'pack' ; +print unpack("C", pack("C", -1)), "\n"; +print unpack("C", pack("C", 0)), "\n"; +print unpack("C", pack("C", 255)), "\n"; +print unpack("C", pack("C", 256)), "\n"; +print unpack("c", pack("c", -129)), "\n"; +print unpack("c", pack("c", -128)), "\n"; +print unpack("c", pack("c", 127)), "\n"; +print unpack("c", pack("c", 128)), "\n"; +no warnings 'pack' ; +print unpack("C", pack("C", -1)), "\n"; +print unpack("C", pack("C", 0)), "\n"; +print unpack("C", pack("C", 255)), "\n"; +print unpack("C", pack("C", 256)), "\n"; +print unpack("c", pack("c", -129)), "\n"; +print unpack("c", pack("c", -128)), "\n"; +print unpack("c", pack("c", 127)), "\n"; +print unpack("c", pack("c", 128)), "\n"; +EXPECT +Character in "C" format wrapped at - line 3. +Character in "C" format wrapped at - line 6. +Character in "c" format wrapped at - line 7. +Character in "c" format wrapped at - line 10. +255 +0 +255 +0 +127 +-128 +127 +-128 +255 +0 +255 +0 +127 +-128 +127 +-128 |