B-DeparseTree
view release on metacpan or search on metacpan
t/20-deparse-526c.t view on Meta::CPAN
if (!$SEEN{$key} && !$not_tested{$key}) {
diag("keyword '$key' seen in $file, but not tested here!!");
$pass = 0;
}
if (exists $SEEN_STRENGH{$key} and $SEEN_STRENGH{$key} != $strength) {
diag("keyword '$key' strengh as seen in $file doen't match here!!");
$pass = 0;
}
}
}
else {
diag("Can't open $file: $!");
$pass = 0;
}
# insanity check
if ($count < 200) {
diag("Saw $count keywords: less than 200!");
$pass = 0;
}
ok($pass, "sanity checks");
}
__DATA__
#
# format:
# keyword args flags
#
# args consists of:
# * one of more digits indictating which lengths of args the function accepts,
# * or 'B' to indiate a binary infix operator,
# * or '@' to indicate a list function.
#
# Flags consists of the following (or '-' if no flags):
# + : strong keyword: can't be overrriden
# p : the args are parenthesised on deparsing;
# 1 : parenthesising of 1st arg length is inverted
# so '234 p1' means: foo a1,a2; foo(a1,a2,a3); foo(a1,a2,a3,a4)
# $ : on the first argument length, there is an implicit extra
# '$_' arg which will appear on deparsing;
# e.g. 12p$ will be tested as: foo(a1); foo(a1,a2);
# and deparsed as: foo(a1, $_); foo(a1,a2);
#
# XXX Note that we really should get this data from regen/keywords.pl
# and regen/opcodes (augmented if necessary), rather than duplicating it
# here.
__SUB__ 0 -
abs 01 $
accept 2 p
alarm 01 $
and B -
atan2 2 p
bind 2 p
binmode 12 p
bless 1 p
break 0 -
caller 0 -
chdir 01 -
chmod @ p1
chomp @ $
chop @ $
chown @ p1
chr 01 $
chroot 01 $
close 01 -
closedir 1 -
cmp B -
connect 2 p
continue 0 -
cos 01 $
crypt 2 p
# dbmopen handled specially
# dbmclose handled specially
defined 01 $+
# delete handled specially
die @ p1
# do handled specially
# dump handled specially
# each handled specially
endgrent 0 -
endhostent 0 -
endnetent 0 -
endprotoent 0 -
endpwent 0 -
endservent 0 -
eof 01 - # also tested specially
eq B -
eval 01 $+
evalbytes 01 $
exec @ p1 # also tested specially
# exists handled specially
exit 01 -
exp 01 $
fc 01 $
fcntl 3 p
fileno 1 -
flock 2 p
fork 0 -
formline 2 p
ge B -
getc 01 -
getgrent 0 -
getgrgid 1 -
getgrnam 1 -
gethostbyaddr 2 p
gethostbyname 1 -
gethostent 0 -
getlogin 0 -
getnetbyaddr 2 p
getnetbyname 1 -
getnetent 0 -
getpeername 1 -
getpgrp 1 -
getppid 0 -
getpriority 2 p
getprotobyname 1 -
getprotobynumber 1 p
getprotoent 0 -
getpwent 0 -
( run in 1.023 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )