summaryrefslogtreecommitdiff
path: root/t/op
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-07-29 00:12:52 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-07-29 00:12:52 +0000
commit164e0d64e76aeb41b383f338cffa7d2e2e075e7c (patch)
treeb1b9bfd4778c4f60efd4f4d13ebcf82e5cbcfb7c /t/op
parent3075ddba723b9b3d732695035818e7b3e7287e85 (diff)
parent2392504606465e088e5dc097fdf20f848f2b94fd (diff)
downloadperl-164e0d64e76aeb41b383f338cffa7d2e2e075e7c.tar.gz
integrate cfgperl changes into mainline
p4raw-id: //depot/perl@3825
Diffstat (limited to 't/op')
-rwxr-xr-xt/op/oct.t49
1 files changed, 36 insertions, 13 deletions
diff --git a/t/op/oct.t b/t/op/oct.t
index 06bf8db660..1dbb941327 100755
--- a/t/op/oct.t
+++ b/t/op/oct.t
@@ -1,15 +1,38 @@
#!./perl
-print "1..11\n";
-
-print +(oct('01234') == 01234) ? "ok" : "not ok", " 1\n";
-print +(oct('0x1234') == 0x1234) ? "ok" : "not ok", " 2\n";
-print +(hex('01234') == 0x1234) ? "ok" : "not ok", " 3\n";
-print +(oct('20000000000') == 020000000000) ? "ok" : "not ok", " 4\n";
-print +(oct('x80000000') == 0x80000000) ? "ok" : "not ok", " 5\n";
-print +(hex('80000000') == 0x80000000) ? "ok" : "not ok", " 6\n";
-print +(oct('1234') == 668) ? "ok" : "not ok", " 7\n";
-print +(hex('1234') == 4660) ? "ok" : "not ok", " 8\n";
-print +(hex('0x1234') == 0x1234) ? "ok" : "not ok", " 9\n";
-print +(oct('b11100') == 28) ? "ok" : "not ok", " 10\n";
-print +(oct('b101010') == 0b101010) ? "ok" : "not ok", " 11\n";
+print "1..28\n";
+
+print +(oct('0b10101') == 0b10101) ? "ok" : "not ok", " 1\n";
+print +(oct('0b10101') == 025) ? "ok" : "not ok", " 2\n";
+print +(oct('0b10101') == 21) ? "ok" : "not ok", " 3\n";
+print +(oct('0b10101') == 0x15) ? "ok" : "not ok", " 4\n";
+
+print +(oct('b10101') == 0b10101) ? "ok" : "not ok", " 5\n";
+print +(oct('b10101') == 025) ? "ok" : "not ok", " 6\n";
+print +(oct('b10101') == 21) ? "ok" : "not ok", " 7\n";
+print +(oct('b10101') == 0x15) ? "ok" : "not ok", " 8\n";
+
+print +(oct('01234') == 0b1010011100) ? "ok" : "not ok", " 9\n";
+print +(oct('01234') == 01234) ? "ok" : "not ok", " 10\n";
+print +(oct('01234') == 668) ? "ok" : "not ok", " 11\n";
+print +(oct('01234') == 0x29c) ? "ok" : "not ok", " 12\n";
+
+print +(oct('0x1234') == 0b1001000110100) ? "ok" : "not ok", " 13\n";
+print +(oct('0x1234') == 011064) ? "ok" : "not ok", " 14\n";
+print +(oct('0x1234') == 4660) ? "ok" : "not ok", " 15\n";
+print +(oct('0x1234') == 0x1234) ? "ok" : "not ok", " 16\n";
+
+print +(hex('01234') == 0b1001000110100) ? "ok" : "not ok", " 17\n";
+print +(hex('01234') == 011064) ? "ok" : "not ok", " 18\n";
+print +(hex('01234') == 4660) ? "ok" : "not ok", " 19\n";
+print +(hex('01234') == 0x1234) ? "ok" : "not ok", " 20\n";
+
+print +(hex('0x1234') == 0b1001000110100) ? "ok" : "not ok", " 21\n";
+print +(hex('0x1234') == 011064) ? "ok" : "not ok", " 22\n";
+print +(hex('0x1234') == 4660) ? "ok" : "not ok", " 23\n";
+print +(hex('0x1234') == 0x1234) ? "ok" : "not ok", " 24\n";
+
+print +(hex('x1234') == 0b1001000110100) ? "ok" : "not ok", " 25\n";
+print +(hex('x1234') == 011064) ? "ok" : "not ok", " 26\n";
+print +(hex('x1234') == 4660) ? "ok" : "not ok", " 27\n";
+print +(hex('x1234') == 0x1234) ? "ok" : "not ok", " 28\n";