Integrate mainline
[p5sagit/p5-mst-13.2.git] / t / pragma / sub_lval.t
index 00080c1..e101f97 100755 (executable)
@@ -1,4 +1,4 @@
-print "1..63\n";
+print "1..64\n";
 
 BEGIN {
     chdir 't' if -d 't';
@@ -430,18 +430,9 @@ foobar() = 12;
 print "# '$newvar'.\nnot " unless $newvar eq "12";
 print "ok 47\n";
 
-# Testing DWIM of foo = bar;
-sub foo : lvalue {
-    $a;
-}
-$a = "not ok 48\n";
-foo = "ok 48\n";
-print $a;
+print "ok 48 # Skip: removed test\n";
 
-open bar, ">nothing" or die $!; 
-bar = *STDOUT;
-print bar "ok 49\n";
-unlink "nothing";
+print "ok 49 # Skip: removed test\n";
 
 {
 my %hash; my @array;
@@ -514,7 +505,12 @@ print "ok 61\n";
 
 $str = "Made w/ JavaScript";
 sub veclv : lvalue { vec($str, 2, 32) }
-veclv() = 0x5065726C;
+if (ord('A') != 193) {
+    veclv() = 0x5065726C;
+}
+else { # EBCDIC?
+    veclv() = 0xD7859993;
+}
 print "# $str\nnot " unless $str eq "Made w/ PerlScript";
 print "ok 62\n";
 
@@ -527,3 +523,11 @@ while (/f/g) {
 }
 print "# @p\nnot " unless "@p" eq "1 8";
 print "ok 63\n";
+
+# Bug 20001223.002: split thought that the list had only one element
+@ary = qw(4 5 6);
+sub lval1 : lvalue { $ary[0]; }
+sub lval2 : lvalue { $ary[1]; }
+(lval1(), lval2()) = split ' ', "1 2 3 4";
+print "not " unless join(':', @ary) eq "1:2:6";
+print "ok 64\n";