projects
/
perl.git
/ commitdiff
free
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
9dd59c3
)
Add one test for ord('').
author
James E Keenan <jkeenan@cpan.org>
Sat, 29 Sep 2012 00:37:00 +0000 (20:37 -0400)
committer
James E Keenan <jkeenan@cpan.org>
Sat, 29 Sep 2012 00:37:00 +0000 (20:37 -0400)
"perldoc -f ord" states that if ord()'s argument is an empty string, the
function returns 0. Demonstrating that this is so.
t/op/chars.t
patch
|
blob
|
blame
|
history
diff --git
a/t/op/chars.t
b/t/op/chars.t
index
a2b6f51
..
d26a632
100644
(file)
--- a/
t/op/chars.t
+++ b/
t/op/chars.t
@@
-6,7
+6,7
@@
BEGIN {
require './test.pl';
}
-plan tests => 33;
+plan tests => 34;
# because of ebcdic.c these should be the same on asciiish
# and ebcdic machines.
@@
-78,3
+78,5
@@
$c = "\c_";
is (ord($c), 31, '\c_');
$c = "\c?";
is (ord($c), 127, '\c?');
+$c = '';
+is (ord($c), 0, 'ord("") is 0');