summaryrefslogtreecommitdiff
path: root/t/op/misc.t
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-12 20:11:45 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-03-12 20:11:45 +0000
commit074479712f24612219fbc26003f537afc1d45c31 (patch)
treee3794ff79d796ff18d6ed53bfa1695a53010b40f /t/op/misc.t
parent53c32ee0ca763f91425c42ba020b39b9de6c8868 (diff)
downloadperl-074479712f24612219fbc26003f537afc1d45c31.tar.gz
another optimized-OP_SASSIGN bug: ops that were not OA_TARGLEX
were being mistakenly subverted anyway p4raw-id: //depot/perl@5683
Diffstat (limited to 't/op/misc.t')
-rwxr-xr-xt/op/misc.t30
1 files changed, 30 insertions, 0 deletions
diff --git a/t/op/misc.t b/t/op/misc.t
index 501efba0a7..ac1a44fadb 100755
--- a/t/op/misc.t
+++ b/t/op/misc.t
@@ -515,3 +515,33 @@ sub foo { eval { return }; }
print "ok\n";
EXPECT
ok
+########
+my @l = qw(hello.* world);
+my $x;
+
+foreach $x (@l) {
+ print "before - $x\n";
+ $x = "\Q$x\E";
+ print "quotemeta - $x\n";
+ $x = "\u$x";
+ print "ucfirst - $x\n";
+ $x = "\l$x";
+ print "lcfirst - $x\n";
+ $x = "\U$x\E";
+ print "uc - $x\n";
+ $x = "\L$x\E";
+ print "lc - $x\n";
+}
+EXPECT
+before - hello.*
+quotemeta - hello\.\*
+ucfirst - Hello\.\*
+lcfirst - hello\.\*
+uc - HELLO\.\*
+lc - hello\.\*
+before - world
+quotemeta - world
+ucfirst - World
+lcfirst - world
+uc - WORLD
+lc - world