3 # $RCSfile: each.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:47 $
9 $h{'jkl','mno'} = "JKL\034MNO";
10 $h{'a',2,3,4,5} = join("\034",'A',2,3,4,5);
41 if ($#keys == 29 && $#values == 29) {print "ok 1\n";} else {print "not ok 1\n";}
43 $i = 0; # stop -w complaints
45 while (($key,$value) = each(%h)) {
46 if ($key eq $keys[$i] && $value eq $values[$i] && $key eq lc($value)) {
48 $i++ if $key eq $value;
52 if ($i == 30) {print "ok 2\n";} else {print "not ok 2\n";}
54 @keys = ('blurfl', keys(%h), 'dyick');
55 if ($#keys == 31) {print "ok 3\n";} else {print "not ok 3\n";}
57 $size = ((split('/',scalar %h))[1]);
59 $newsize = ((split('/',scalar %h))[1]);
60 if ($newsize == $size * 8) {print "ok 4\n";} else {print "not ok 4\n";}
62 $size = ((split('/',scalar %h))[1]);
63 if ($size == $newsize) {print "ok 5\n";} else {print "not ok 5\n";}
65 $size = ((split('/',scalar %h))[1]);
66 if ($size == $newsize) {print "ok 6\n";} else {print "not ok 6\n";}
69 $size = ((split('/',scalar %h))[1]);
70 if ($size == 8) {print "ok 7\n";} else {print "not ok 7\n";}