diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 1999-07-27 13:37:23 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-07-27 13:37:23 +0000 |
commit | 805ca49f0a4fb1abc3f3499c325115b1d4e48384 (patch) | |
tree | 25e7c401ce175f0635578f4048a2066f185117e7 | |
parent | 7ef8a0682774333b86c3ce2bc0270ce51f7fe433 (diff) | |
download | perl-805ca49f0a4fb1abc3f3499c325115b1d4e48384.tar.gz |
Test hex('x...').
p4raw-id: //depot/cfgperl@3800
-rwxr-xr-x | t/op/oct.t | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/t/op/oct.t b/t/op/oct.t index c0613a92bf..1dbb941327 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"; |