YA sync with mainline
[p5sagit/p5-mst-13.2.git] / t / op / misc.t
index 8281bf0..b46c0cc 100755 (executable)
@@ -59,11 +59,12 @@ $a = ":="; split /($a)/o, "a:=b:=c"; print "@_"
 EXPECT
 a := b := c
 ########
+use integer;
 $cusp = ~0 ^ (~0 >> 1);
 $, = " ";
 print +($cusp - 1) % 8, $cusp % 8, -$cusp % 8, ($cusp + 1) % 8, "!\n";
 EXPECT
-7 0 0 1 !
+-1 0 0 1 !
 ########
 $foo=undef; $foo->go;
 EXPECT
@@ -104,7 +105,7 @@ EXPECT
 ########
 %@x=0;
 EXPECT
-Can't modify hash deref in repeat at - line 1, near "0;"
+Can't modify hash dereference in repeat (x) at - line 1, near "0;"
 Execution of - aborted due to compilation errors.
 ########
 $_="foo";
@@ -353,16 +354,18 @@ Unmatched right curly bracket at (re_eval 1) line 1, at end of line
 syntax error at (re_eval 1) line 1, near ""{"}"
 Compilation failed in regexp at - line 1.
 ########
-BEGIN { @ARGV = qw(a b c) }
+BEGIN { @ARGV = qw(a b c d e) }
 BEGIN { print "argv <@ARGV>\nbegin <",shift,">\n" }
 END { print "end <",shift,">\nargv <@ARGV>\n" }
 INIT { print "init <",shift,">\n" }
+CHECK { print "check <",shift,">\n" }
 EXPECT
-argv <a b c>
+argv <a b c d e>
 begin <a>
-init <b>
-end <c>
-argv <>
+check <b>
+init <c>
+end <d>
+argv <e>
 ########
 -l
 # fdopen from a system descriptor to a system descriptor used to close
@@ -497,3 +500,11 @@ END { print $foo }
 ';
 EXPECT
 ZZZ
+########
+-w
+if (@ARGV) { print "" }
+else {
+  if ($x == 0) { print "" } else { print $x }
+}
+EXPECT
+Use of uninitialized value in numeric eq (==) at - line 4.