summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1999-09-05 02:07:42 -0400
committerGurusamy Sarathy <gsar@cpan.org>1999-09-06 18:06:06 +0000
commit3dbf192b2cd968c3b06108d76689ba36682d6f0e (patch)
treea483c9be28fc01e5d3f4b0311600b17c2cb36ec9 /t
parentb78218b7f806d19fec2aa4d578cd6086927cd9ab (diff)
downloadperl-3dbf192b2cd968c3b06108d76689ba36682d6f0e.tar.gz
change#3612 is buggy when quotemeta argument matches target
(hope this is the last of the optimized-OP_SASSIGN bugs) Message-Id: <199909051007.GAA06423@monk.mps.ohio-state.edu> Subject: Re: [BUG: quotemeta] p4raw-link: @3612 on //depot/perl: b162f9ead0a98db35cdcfc8c889e344c040c8d8e p4raw-id: //depot/perl@4087
Diffstat (limited to 't')
-rwxr-xr-xt/op/lex_assign.t30
1 files changed, 29 insertions, 1 deletions
diff --git a/t/op/lex_assign.t b/t/op/lex_assign.t
index 01e0ba0019..b5c471a5a0 100755
--- a/t/op/lex_assign.t
+++ b/t/op/lex_assign.t
@@ -22,7 +22,8 @@ $nn = $n = 2;
sub subb {"in s"}
@INPUT = <DATA>;
-print "1..", (8 + @INPUT), "\n";
+@simple_input = grep /^\s*\w+\s*\$\w+\s*[#\n]/, @INPUT;
+print "1..", (8 + @INPUT + @simple_input), "\n";
$ord = 0;
sub wrn {"@_"}
@@ -121,6 +122,33 @@ EOE
}
}
}
+
+for (@simple_input) {
+ $ord++;
+ ($op, undef, $comment) = /^([^\#]+)(\#\s+(.*))?/;
+ $comment = $op unless defined $comment;
+ ($operator, $variable) = /^\s*(\w+)\s*\$(\w+)/ or warn "misprocessed '$_'\n";
+ eval <<EOE;
+ local \$SIG{__WARN__} = \\&wrn;
+ my \$$variable = "Ac# Ca\\nxxx";
+ \$$variable = $operator \$$variable;
+ \$toself = \$$variable;
+ \$direct = $operator "Ac# Ca\\nxxx";
+ print "# \\\$$variable = $operator \\\$$variable\\nnot "
+ unless \$toself eq \$direct;
+ print "ok \$ord\\n";
+EOE
+ if ($@) {
+ if ($@ =~ /is unimplemented/) {
+ print "# skipping $comment: unimplemented:\nok $ord\n";
+ } elsif ($@ =~ /Can't (modify|take log of 0)/) {
+ print "# skipping $comment: syntax not good for selfassign:\nok $ord\n";
+ } else {
+ warn $@;
+ print "not ok $ord\n";
+ }
+ }
+}
__END__
ref $xref # ref
ref $cstr # ref nonref