use warnings;
use Test::More tests => 2;
+use if $ENV{AUTHOR_TESTING}, 'Test::Warnings';
use Sub::Name;
use B::Deparse;
use warnings;
use Test::More;
+use if $ENV{AUTHOR_TESTING}, 'Test::Warnings';
plan skip_all => 'B::C required for testing perlcc -O3'
unless eval { +require B::C; };
plan skip_all => 'perlcc required' unless Devel::CheckBin::can_run('perlcc');
-plan tests => 1;
-
my $f = "t/rt96893x.pl";
open my $fh, ">", $f; END { unlink $f if $f }
print $fh 'use Sub::Name; subname("main::bar", sub{42}); print "# successfully ran subname() with perlcc\n";';
is($? >> 8, 0, 'executable completed successfully');
unlink "t/rt96893x", "t/rt96893x.exe";
+
+done_testing;
# vim: ft=perl
use warnings;
use Test::More;
+use if $ENV{AUTHOR_TESTING}, 'Test::Warnings';
use B 'svref_2object';
BEGIN { $^P |= 0x210 }
0x1f4a9, # PILE OF POO
unless "$]" < 5.008;
-plan tests => @ordinal * 2 * 3;
-
my $legal_ident_char = "A-Z_a-z0-9'";
$legal_ident_char .= join '', map chr, 0x100, 0x498
unless "$]" < 5.008;
}
caller3_ok $sub, $expected, 'natively compiled sub', $ord;
}
+
+done_testing;
use warnings;
use Test::More;
+use if $ENV{AUTHOR_TESTING}, 'Test::Warnings';
BEGIN {
if ("$]" < 5.018) {
plan 'skip_all' => 'lexical subs not supported on this perl';
use warnings;
use Test::More tests => 1;
+use if $ENV{AUTHOR_TESTING}, 'Test::Warnings';
use Sub::Name;
my $sub = sub { (caller(0))[3] };
BEGIN { $^P |= 0x210 }
-use Test::More tests => 10;
+use Test::More;
+use if $ENV{AUTHOR_TESTING}, 'Test::Warnings';
use Sub::Name;
my $x = subname foo => sub { (caller 0)[3] };
::is($DB::sub{$_}, $anon);
}
+::done_testing();
# vim: ft=perl