diff options
author | Radu Greab <radu@netsoft.ro> | 2001-01-12 21:16:09 +0200 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-01-12 18:05:30 +0000 |
commit | 7c8af4ef9d2544e11473e47bd0c86ea792b65202 (patch) | |
tree | 5029125fa0c3d0bc4cc4a519e58743935e353ae8 /t/pragma | |
parent | 78f9721bf0dc33981bedf125bcfa5c0c42b69eba (diff) | |
download | perl-7c8af4ef9d2544e11473e47bd0c86ea792b65202.tar.gz |
Re: [PATCH] [ID 20001223.002] lvalues in list context
Message-ID: <14943.15321.515713.119805@ix.netsoft.ro>
p4raw-id: //depot/perl@8418
Diffstat (limited to 't/pragma')
-rwxr-xr-x | t/pragma/sub_lval.t | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/t/pragma/sub_lval.t b/t/pragma/sub_lval.t index 00080c121d..03a2fa0a9a 100755 --- a/t/pragma/sub_lval.t +++ b/t/pragma/sub_lval.t @@ -1,4 +1,4 @@ -print "1..63\n"; +print "1..64\n"; BEGIN { chdir 't' if -d 't'; @@ -527,3 +527,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"; |