diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-09-04 13:36:58 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-09-04 13:36:58 +0000 |
commit | 3d23fcca54eb2e6714310bda6646ff28250d2f51 (patch) | |
tree | 693b09fef2c974731e0a7b016c7ca8fcec244fae /t/comp | |
parent | 3c08d4180e1cde663eb0d2ef5aa78746c9d998ea (diff) | |
download | perl-3d23fcca54eb2e6714310bda6646ff28250d2f51.tar.gz |
Add the \[$@%&*] prototype support.
p4raw-id: //depot/perl@11865
Diffstat (limited to 't/comp')
-rwxr-xr-x | t/comp/proto.t | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/t/comp/proto.t b/t/comp/proto.t index ae0f9abfcb..a60f36f75b 100755 --- a/t/comp/proto.t +++ b/t/comp/proto.t @@ -16,7 +16,7 @@ BEGIN { use strict; -print "1..125\n"; +print "1..130\n"; my $i = 1; @@ -506,3 +506,24 @@ print "ok ", $i++, "\n"; # recv takes a scalar reference for its second argument print "not " unless prototype "CORE::recv" eq '*\\$$$'; print "ok ", $i++, "\n"; + +{ + my $myvar; + my @myarray; + my %myhash; + sub mysub { print "not calling mysub I hope\n" } + local *myglob; + + sub myref (\[$@%&*]) { print "# $_[0]\n"; return "$_[0]" } + + print "not " unless myref($myvar) =~ /^SCALAR\(/; + print "ok ", $i++, "\n"; + print "not " unless myref(@myarray) =~ /^ARRAY\(/; + print "ok ", $i++, "\n"; + print "not " unless myref(%myhash) =~ /^HASH\(/; + print "ok ", $i++, "\n"; + print "not " unless myref(&mysub) =~ /^CODE\(/; + print "ok ", $i++, "\n"; + print "not " unless myref(*myglob) =~ /^GLOB\(/; + print "ok ", $i++, "\n"; +} |