From 919ad5f783fa6cf8c1d5b1fd8bfdf8d3b0e18fdb Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Mon, 30 Apr 2012 08:49:32 -0700 Subject: Add &CORE::prototype --- t/op/coreamp.t | 6 +++++- t/op/coresubs.t | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 't') 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 => '', 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 ++; -- cgit v1.2.1