BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
-print "1..6\n";
+print "1..7\n";
# compile time evaluation
{
use integer;
$x = length("abc") % -10;
- print $x == 3 ? "ok 6\n" : "# expected 3, got $x\nnot ok 6\n";
+ $y = (3/-10)*-10;
+ print $x+$y == 3 && abs($x) < 10 ? "ok 6\n" : "not ok 6\n";
}
+
+# check bad strings still get converted
+
+@x = ( 6, 8, 10);
+print "not " if $x["1foo"] != 8;
+print "ok 7\n";