From: Jarkko Hietaniemi Date: Tue, 27 Jul 1999 13:37:23 +0000 (+0000) Subject: Test hex('x...'). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=805ca49f0a4fb1abc3f3499c325115b1d4e48384;p=p5sagit%2Fp5-mst-13.2.git Test hex('x...'). p4raw-id: //depot/cfgperl@3800 --- diff --git a/t/op/oct.t b/t/op/oct.t index c0613a9..1dbb941 100755 --- a/t/op/oct.t +++ b/t/op/oct.t @@ -1,6 +1,6 @@ #!./perl -print "1..24\n"; +print "1..28\n"; print +(oct('0b10101') == 0b10101) ? "ok" : "not ok", " 1\n"; print +(oct('0b10101') == 025) ? "ok" : "not ok", " 2\n"; @@ -31,3 +31,8 @@ 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";