This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
test in change#4428 needs strict interpretation of C modulus
[perl5.git] / t / op / ord.t
CommitLineData
8d063cd8
LW
1#!./perl
2
463ee0b2 3print "1..3\n";
8d063cd8
LW
4
5# compile time evaluation
6
9d116dd7
JH
7# 65 ASCII
8# 193 EBCDIC
9if (ord('A') == 65 || ord('A') == 193) {print "ok 1\n";} else {print "not ok 1\n";}
8d063cd8
LW
10
11# run time evaluation
12
13$x = 'ABC';
9d116dd7 14if (ord($x) == 65 || ord($x) == 193) {print "ok 2\n";} else {print "not ok 2\n";}
463ee0b2 15
9d116dd7 16if (chr 65 == 'A' || chr 193 == 'A') {print "ok 3\n";} else {print "not ok 3\n";}