summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-04-30 08:49:32 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-05-29 09:36:26 -0700
commit919ad5f783fa6cf8c1d5b1fd8bfdf8d3b0e18fdb (patch)
treeed21220578d42059685627bd0b1e20303bb58d14 /t
parent1efec5ed466a1faf287ecbdfe8715be7ffef7712 (diff)
downloadperl-919ad5f783fa6cf8c1d5b1fd8bfdf8d3b0e18fdb.tar.gz
Add &CORE::prototype
Diffstat (limited to 't')
-rw-r--r--t/op/coreamp.t6
-rw-r--r--t/op/coresubs.t5
2 files changed, 8 insertions, 3 deletions
diff --git a/t/op/coreamp.t b/t/op/coreamp.t
index 1e9147be46..e0b7246fda 100644
--- a/t/op/coreamp.t
+++ b/t/op/coreamp.t
@@ -29,6 +29,7 @@ my %op_desc = (
evalbytes=> 'eval "string"',
join => 'join or string',
pos => 'match position',
+ prototype=> 'subroutine prototype',
readline => '<HANDLE>',
readpipe => 'quoted execution (``, qx)',
reset => 'symbol reset',
@@ -619,6 +620,9 @@ is pos, 4, 'writing to &pos without args';
is pos $x, 4, 'writing to &pos without args';
}
+test_proto 'prototype';
+$tests++;
+is &myprototype(\&myprototype), prototype("CORE::prototype"), '&prototype';
test_proto 'quotemeta', '$', '\$';
@@ -935,7 +939,7 @@ like $@, qr'^Undefined format "STDOUT" called',
my $word = $1;
next if
$word =~ /^(?:s(?:t(?:ate|udy)|(?:pli|or)t|calar|ay|ub)?|d(?:ef
- ault|ump|o)|p(?:r(?:ototype|intf?)|ackag
+ ault|ump|o)|p(?:rintf?|ackag
e)|e(?:ls(?:if|e)|val|q)|g(?:[et]|iven|oto
|rep)|u(?:n(?:less|def|til)|se)|l(?:(?:as)?t|ocal|e)|re
(?:quire|turn|do)|__(?:DATA|END)__|for(?:each|mat)?|(?:
diff --git a/t/op/coresubs.t b/t/op/coresubs.t
index 8fcdb148c5..3c1e0f437e 100644
--- a/t/op/coresubs.t
+++ b/t/op/coresubs.t
@@ -19,7 +19,7 @@ my %unsupported = map +($_=>1), qw (
__DATA__ __END__ AUTOLOAD BEGIN UNITCHECK CORE DESTROY END INIT CHECK and
cmp default do dump else elsif eq eval for foreach
format ge given goto grep gt if last le local lt m map my ne next
- no or our package print printf prototype q qq qr qw qx redo require
+ no or our package print printf q qq qr qw qx redo require
return s say scalar sort split state study sub tr undef unless until use
when while x xor y
);
@@ -95,7 +95,8 @@ while(<$kh>) {
next if ($proto =~ /\@/);
# These ops currently accept any number of args, despite their
# prototypes, if they have any:
- next if $word =~ /^(?:chom?p|exec|keys|each|not|read(?:lin|pip)e
+ next if $word =~ /^(?:chom?p|exec|keys|each|not
+ |(?:prototyp|read(?:lin|pip))e
|reset|system|values|l?stat)|evalbytes/x;
$tests ++;