diff options
author | Mark Murray <markm@FreeBSD.org> | 2000-06-25 11:04:01 +0000 |
---|---|---|
committer | Mark Murray <markm@FreeBSD.org> | 2000-06-25 11:04:01 +0000 |
commit | 5bd17c648f0bbb4ad71945d610980dae7c796874 (patch) | |
tree | 27e7479daa33fdd2e21c9511b9eaeef4bd9d5b51 /contrib/perl5/t/op/list.t | |
parent | 2c00ff843494c9d436d48007c3cdf9c7500976a8 (diff) | |
parent | 120a02d4f3990e59fba1df18a155ff7233b4d827 (diff) |
This commit was generated by cvs2svn to compensate for changes in r62076,
which included commits to RCS files with non-trunk default branches.
Notes
Notes:
svn path=/head/; revision=62077
Diffstat (limited to 'contrib/perl5/t/op/list.t')
-rwxr-xr-x | contrib/perl5/t/op/list.t | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/contrib/perl5/t/op/list.t b/contrib/perl5/t/op/list.t index a4230b681b36..4d7a2d5444b4 100755 --- a/contrib/perl5/t/op/list.t +++ b/contrib/perl5/t/op/list.t @@ -1,8 +1,6 @@ #!./perl -# $RCSfile: list.t,v $$Revision: 4.1 $$Date: 92/08/07 18:28:02 $ - -print "1..27\n"; +print "1..28\n"; @foo = (1, 2, 3, 4); if ($foo[0] == 1 && $foo[3] == 4) {print "ok 1\n";} else {print "not ok 1\n";} @@ -81,3 +79,11 @@ for ($x = 0; $x < 3; $x++) { print $a,$b,$c; } +# slices +{ + my @a = (0, undef, undef, 3); + my @b = @a[1,2]; + my @c = (0, undef, undef, 3)[1, 2]; + print "not " unless @b == @c and @c == 2; + print "ok 28\n"; +} |