summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-05-31 05:01:47 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-05-31 05:01:47 +0000
commitd64830355c411305652aeae96623a3ca530d6d38 (patch)
tree047b92b240d44e6d3f29d85db3af5f23cedd2b85 /t
parent5eb85357989417f39c9b142b6f053d886d09816b (diff)
downloadperl-d64830355c411305652aeae96623a3ca530d6d38.tar.gz
scalar() doesn't force scalar context when used in void context
(from Simon Cozens) p4raw-id: //depot/perl@6171
Diffstat (limited to 't')
-rwxr-xr-xt/op/wantarray.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/op/wantarray.t b/t/op/wantarray.t
index 0a47b6d3ba..4b6f37cf0f 100755
--- a/t/op/wantarray.t
+++ b/t/op/wantarray.t
@@ -1,6 +1,6 @@
#!./perl
-print "1..3\n";
+print "1..7\n";
sub context {
my ( $cona, $testnum ) = @_;
my $conb = (defined wantarray) ? ( wantarray ? 'A' : 'S' ) : 'V';
@@ -13,4 +13,8 @@ sub context {
context('V',1);
$a = context('S',2);
@a = context('A',3);
+scalar context('S',4);
+$a = scalar context('S',5);
+($a) = context('A',6);
+($a) = scalar context('S',7);
1;