B-DeparseTree
view release on metacpan or search on metacpan
t/10-core.t view on Meta::CPAN
# testit redo => '(CORE::redo FOO);', '(redo FOO);';
# testit redo => '(CORE::redo);', '(redo);';
# testit redo => '(CORE::redo FOO);', '(redo FOO);';
# FIXME: used to work...
# testit return => '(return);', '(return);';
# testit return => '(CORE::return);', '(return);';
# these are the keywords I couldn't think how to test within this framework
my %not_tested = map { $_ => 1} qw(
__DATA__
__END__
__FILE__
__LINE__
__PACKAGE__
AUTOLOAD
BEGIN
CHECK
CORE
DESTROY
t/10-core.t view on Meta::CPAN
my $pass = 1;
if (open my $fh, '<', $file) {
while (<$fh>) {
last if /^__END__$/;
}
while (<$fh>) {
next unless /^([+\-])(\w+)$/;
my ($strength, $key) = ($1, $2);
$strength = ($strength eq '+') ? 1 : 0;
$count++;
if (!$SEEN{$key} && !$not_tested{$key}) {
diag("keyword '$key' seen in $file, but not tested here!!");
$pass = 0;
}
if (exists $SEEN_STRENGTH{$key} and $SEEN_STRENGTH{$key} != $strength) {
diag("keyword '$key' strengh as seen in $file doen't match here!!");
$pass = 0;
}
}
}
else {
t/20-deparse-526c.t view on Meta::CPAN
testit next => '(CORE::next FOO);', '(next FOO);';
testit redo => '(CORE::redo);', '(redo);';
testit redo => '(CORE::redo FOO);', '(redo FOO);';
testit redo => '(CORE::redo);', '(redo);';
testit redo => '(CORE::redo FOO);', '(redo FOO);';
testit return => '(return);', '(return);';
testit return => '(CORE::return);', '(return);';
# these are the keywords I couldn't think how to test within this framework
my %not_tested = map { $_ => 1} qw(
__DATA__
__END__
__FILE__
__LINE__
__PACKAGE__
AUTOLOAD
BEGIN
CHECK
CORE
DESTROY
t/20-deparse-526c.t view on Meta::CPAN
my $pass = 1;
if (open my $fh, '<', $file) {
while (<$fh>) {
last if /^__END__$/;
}
while (<$fh>) {
next unless /^([+\-])(\w+)$/;
my ($strength, $key) = ($1, $2);
$strength = ($strength eq '+') ? 1 : 0;
$count++;
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 {
( run in 0.245 second using v1.01-cache-2.11-cpan-26ccb49234f )