From 1d0ef875ad68662c31346951eeba38d25948ba59 Mon Sep 17 00:00:00 2001 From: "Norton T. Allen" Date: Wed, 18 Feb 1998 06:19:54 -0500 Subject: t/op/wantarray.t p4raw-id: //depot/perl@555 --- t/op/wantarray.t | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 t/op/wantarray.t (limited to 't') diff --git a/t/op/wantarray.t b/t/op/wantarray.t new file mode 100755 index 0000000000..0a47b6d3ba --- /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; -- cgit v1.2.1