summaryrefslogtreecommitdiff
path: root/t/comp
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-09-04 13:36:58 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-09-04 13:36:58 +0000
commit3d23fcca54eb2e6714310bda6646ff28250d2f51 (patch)
tree693b09fef2c974731e0a7b016c7ca8fcec244fae /t/comp
parent3c08d4180e1cde663eb0d2ef5aa78746c9d998ea (diff)
downloadperl-3d23fcca54eb2e6714310bda6646ff28250d2f51.tar.gz
Add the \[$@%&*] prototype support.
p4raw-id: //depot/perl@11865
Diffstat (limited to 't/comp')
-rwxr-xr-xt/comp/proto.t23
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";
+}