Add more known sprintf failures.
[p5sagit/p5-mst-13.2.git] / t / op / ord.t
CommitLineData
8d063cd8 1#!./perl
2
ecf52eaf 3print "1..8\n";
8d063cd8 4
5# compile time evaluation
6
ecf52eaf 7# 'A' 65 ASCII
8# 'A' 193 EBCDIC
9d116dd7 9if (ord('A') == 65 || ord('A') == 193) {print "ok 1\n";} else {print "not ok 1\n";}
8d063cd8 10
bed171df 11print "not " unless ord(chr(500)) == 500;
12print "ok 2\n";
13
8d063cd8 14# run time evaluation
15
16$x = 'ABC';
bed171df 17if (ord($x) == 65 || ord($x) == 193) {print "ok 3\n";} else {print "not ok 3\n";}
18
19if (chr 65 eq 'A' || chr 193 eq 'A') {print "ok 4\n";} else {print "not ok 4\n";}
463ee0b2 20
ecf52eaf 21print "not " unless ord(chr(500)) == 500;
22print "ok 5\n";
23
bed171df 24$x = 500;
25print "not " unless ord(chr($x)) == $x;
ecf52eaf 26print "ok 6\n";
27
28print "not " unless ord("\x{1234}") == 0x1234;
29print "ok 7\n";
30
31$x = "\x{1234}";
32print "not " unless ord($x) == 0x1234;
33print "ok 8\n";
34