summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/t/op/concat2.t
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/perl/t/op/concat2.t')
-rw-r--r--gnu/usr.bin/perl/t/op/concat2.t18
1 files changed, 17 insertions, 1 deletions
diff --git a/gnu/usr.bin/perl/t/op/concat2.t b/gnu/usr.bin/perl/t/op/concat2.t
index 8e962996eb3..a1cc0e6daf4 100644
--- a/gnu/usr.bin/perl/t/op/concat2.t
+++ b/gnu/usr.bin/perl/t/op/concat2.t
@@ -12,7 +12,7 @@ BEGIN {
set_up_inc('../lib');
}
-plan 3;
+plan 4;
# This test is in the file because overload.pm uses concatenation.
{ package o; use overload '""' => sub { $_[0][0] } }
@@ -57,3 +57,19 @@ fresh_perl_is <<'end', "tmp\ntmp\n", {},
print canonpath(bless {},"Path::Class::Dir"), "\n";
end
"recursive concat does not share TARGs";
+
+# don't include the assign as part of the multiconcat if the target
+# includes 'local'. This used to screw up on magic vars because the
+# 'local $~' was done (thus emptying the var) before multiconcat was
+# called.
+
+
+{
+ local $~ = 'FOO';
+ my $s;
+ {
+ local $~ = "$~X";
+ $s = $~;
+ }
+ is($s, 'FOOX', 'local $magic_var = "...."');
+}