diff options
author | David Dyck <david.dyck@fluke.com> | 2001-04-05 02:40:58 -0700 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-04-05 22:24:03 +0000 |
commit | 93312bbf9c4dd9a5e320a35817a8d3bcd410c1b6 (patch) | |
tree | c26a67074f2ae98d5e8a7f849a83b15f2acb12ca /t/op/oct.t | |
parent | 6f894eade1cb03fcc18e4faa9e39f693bad68f34 (diff) | |
download | perl-93312bbf9c4dd9a5e320a35817a8d3bcd410c1b6.tar.gz |
patch for t/op/oct.t that shows need for patch supplied with bug 20010404.009, (bugs in hex and oct)
Message-ID: <Pine.LNX.4.30.0104050838330.30478-100000@dd.tc.fluke.com>
p4raw-id: //depot/perl@9574
Diffstat (limited to 't/op/oct.t')
-rwxr-xr-x | t/op/oct.t | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/t/op/oct.t b/t/op/oct.t index 896f8756b6..fe155d3a2d 100755 --- a/t/op/oct.t +++ b/t/op/oct.t @@ -1,6 +1,6 @@ #!./perl -print "1..44\n"; +print "1..50\n"; print +(oct('0b1_0101') == 0b101_01) ? "ok" : "not ok", " 1\n"; print +(oct('0b10_101') == 0_2_5) ? "ok" : "not ok", " 2\n"; @@ -77,3 +77,12 @@ if (ord("\t") != 9) { else { print "\x2F_" eq "/_" ? "ok" : "not ok", " 44\n"; } + +print +(oct('0b'.( '0'x10).'1_0101') == 0b101_01) ? "ok" : "not ok", " 45\n"; +print +(oct('0b'.( '0'x100).'1_0101') == 0b101_01) ? "ok" : "not ok", " 46\n"; +print +(oct('0b'.('0'x1000).'1_0101') == 0b101_01) ? "ok" : "not ok", " 47\n"; + +print +(hex(( '0'x10).'01234') == 0x1234) ? "ok" : "not ok", " 48\n"; +print +(hex(( '0'x100).'01234') == 0x1234) ? "ok" : "not ok", " 49\n"; +print +(hex(('0'x1000).'01234') == 0x1234) ? "ok" : "not ok", " 50\n"; + |