diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-04-26 20:40:48 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-05-29 09:36:24 -0700 |
commit | eb31eb35441e01319e2cefc903717c2077a60c01 (patch) | |
tree | 3efec0cb14fac24fc6502797a4ebd1cdd98deda6 /t | |
parent | d885f758c395fc9ced8e329d176848c477181d17 (diff) | |
download | perl-eb31eb35441e01319e2cefc903717c2077a60c01.tar.gz |
Add &CORE::delete
Diffstat (limited to 't')
-rw-r--r-- | t/op/coreamp.t | 4 | ||||
-rw-r--r-- | t/op/coresubs.t | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/t/op/coreamp.t b/t/op/coreamp.t index 65b299fbc6..79286805d5 100644 --- a/t/op/coreamp.t +++ b/t/op/coreamp.t @@ -885,8 +885,8 @@ like $@, qr'^Undefined format "STDOUT" called', if (m?__END__?..${\0} and /^[-+](.*)/) { my $word = $1; next if - $word =~ /^(?:s(?:t(?:ate|udy)|(?:pli|or)t|calar|ay|ub)?|d(?:e(?:f - ault|lete)|ump|o)|p(?:r(?:ototype|intf?)|ackag + $word =~ /^(?:s(?:t(?:ate|udy)|(?:pli|or)t|calar|ay|ub)?|d(?:ef + ault|ump|o)|p(?:r(?:ototype|intf?)|ackag e|os)|e(?:ls(?:if|e)|xists|val|q)|g(?:[et]|iven|lob|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 84528b52ec..2ebd3aab20 100644 --- a/t/op/coresubs.t +++ b/t/op/coresubs.t @@ -17,7 +17,7 @@ my $bd = new B::Deparse '-p'; my %unsupported = map +($_=>1), qw ( __DATA__ __END__ AUTOLOAD BEGIN UNITCHECK CORE DESTROY END INIT CHECK and - cmp default delete do dump else elsif eq eval exists for foreach + cmp default do dump else elsif eq eval exists for foreach format ge given glob goto grep gt if last le local lt m map my ne next no or our package pos print printf prototype q qq qr qw qx redo require return s say scalar sort split state study sub tr undef unless until use @@ -26,6 +26,7 @@ my %unsupported = map +($_=>1), qw ( my %args_for = ( dbmopen => '%1,$2,$3', dbmclose => '%1', + delete => '$1[2]', ); use File::Spec::Functions; @@ -50,7 +51,8 @@ while(<$kh>) { CORE::state $protochar = qr/([^\\]|\\(?:[^[]|\[[^]]+\]))/; my $numargs = - () = $proto =~ s/;.*//r =~ /\G$protochar/g; + $word eq 'delete' ? 1 : + (() = $proto =~ s/;.*//r =~ /\G$protochar/g); my $code = "#line 1 This-line-makes-__FILE__-easier-to-test. sub { () = (my$word(" |