From: Norton T. Allen Date: Wed, 18 Feb 1998 11:19:54 +0000 (-0500) Subject: t/op/wantarray.t X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1d0ef875ad68662c31346951eeba38d25948ba59;p=p5sagit%2Fp5-mst-13.2.git t/op/wantarray.t p4raw-id: //depot/perl@555 --- diff --git a/t/op/wantarray.t b/t/op/wantarray.t new file mode 100755 index 0000000..0a47b6d --- /dev/null +++ b/t/op/wantarray.t @@ -0,0 +1,16 @@ +#!./perl + +print "1..3\n"; +sub context { + my ( $cona, $testnum ) = @_; + my $conb = (defined wantarray) ? ( wantarray ? 'A' : 'S' ) : 'V'; + unless ( $cona eq $conb ) { + print "# Context $conb should be $cona\nnot "; + } + print "ok $testnum\n"; +} + +context('V',1); +$a = context('S',2); +@a = context('A',3); +1;