summaryrefslogtreecommitdiff
path: root/t/op/coreamp.t
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>2019-10-24 10:22:16 +0100
committerPaul Evans <leonerd@leonerd.org.uk>2019-10-24 11:07:44 +0100
commitb0df1b4788c0fce0e3edf9958cb6ab4515236e7f (patch)
tree2a9b52a5ddf06a1f1ac0d1908eace465b65819c5 /t/op/coreamp.t
parent3e3ae9625d83ece43a3de366d2a6aa178bee355f (diff)
downloadperl-b0df1b4788c0fce0e3edf9958cb6ab4515236e7f.tar.gz
Move keywords from a regexp to a qw() list
Diffstat (limited to 't/op/coreamp.t')
-rw-r--r--t/op/coreamp.t18
1 files changed, 9 insertions, 9 deletions
diff --git a/t/op/coreamp.t b/t/op/coreamp.t
index 7231d66e81..d7700e0e1d 100644
--- a/t/op/coreamp.t
+++ b/t/op/coreamp.t
@@ -1158,20 +1158,20 @@ like $@, qr'^Undefined format "STDOUT" called',
File::Spec::Functions::catfile(
File::Spec::Functions::updir,'regen','keywords.pl'
);
+ my %nottest_words = map { $_ => 1 } qw(
+ AUTOLOAD BEGIN CHECK CORE DESTROY END INIT UNITCHECK
+ __DATA__ __END__
+ 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
+ q qq qr qw qx redo require return s say sort state sub tr unless until use
+ when while x xor y
+ );
open my $kh, $keywords_file
or die "$0 cannot open $keywords_file: $!";
while(<$kh>) {
if (m?__END__?..${\0} and /^[-+](.*)/) {
my $word = $1;
- next if
- $word =~ /^(?:s(?:tate|ort|ay|ub)?|d(?:ef
- ault|ump|o)|p(?:rintf?|ackag
- e)|e(?:ls(?:if|e)|val|q)|g(?:[et]|iven|oto
- |rep)|u(?:n(?:less|til)|se)|l(?:(?:as)?t|ocal|e)|re
- (?:quire|turn|do)|__(?:DATA|END)__|for(?:each|mat)?|(?:
- AUTOLOA|EN)D|n(?:e(?:xt)?|o)|C(?:HECK|ORE)|wh(?:ile|en)
- |(?:ou?|t)r|m(?:ap|y)?|UNITCHECK|q[qrwx]?|x(?:or)?|DEST
- ROY|BEGIN|INIT|and|cmp|if|y)\z/x;
+ next if $nottest_words{$word};
$tests ++;
ok exists &{"my$word"}
|| (eval{&{"CORE::$word"}}, $@ =~ /cannot be called directly/),