second attempt to fix [perl #24914] freeing a CV reference that was
[p5sagit/p5-mst-13.2.git] / t / op / concat.t
index c1a6e23..865a498 100644 (file)
@@ -18,7 +18,7 @@ sub ok {
     return $ok;
 }
 
-print "1..18\n";
+print "1..20\n";
 
 ($a, $b, $c) = qw(foo bar);
 
@@ -104,3 +104,16 @@ sub beq { use bytes; $_[0] eq $_[1]; }
     ok(beq($l, "\x{fe}"), "right not changed after concat b+u");
     ok(beq($r, "\x{101}"), "left not changed after concat b+u");
 }
+
+{
+    my $a; ($a .= 5) . 6;
+    ok($a == 5, '($a .= 5) . 6 - present since 5.000');
+}
+
+{
+    # [perl #24508] optree construction bug
+    sub strfoo { "x" }
+    my ($x, $y);
+    $y = ($x = '' . strfoo()) . "y";
+    ok( "$x,$y" eq "x,xy", 'figures out correct target' );
+}