+# Testing HTMLBatch
BEGIN {
if($ENV{PERL_CORE}) {
chdir 't';
next unless -e $t_maybe;
$t_dir = $t_maybe;
- $corpus_dir = File::Spec->catdir( $t_maybe, 'test_lib' );
+ $corpus_dir = File::Spec->catdir( $t_maybe, 'testlib1' );
next unless -e $corpus_dir;
last;
}
BEGIN {
- chdir 't';
if($ENV{PERL_CORE}) {
+ chdir 't';
@INC = '../lib';
+ } else {
+ push @INC, '../lib';
}
}
$Pod::Simple::Text::FREAKYMODE = 1;
use Pod::Simple::TiedOutFH ();
+chdir 't' unless $ENV{PERL_CORE};
+
sub source_path {
my $file = shift;
if ($ENV{PERL_CORE}) {
"junk1.pod",
"junk2.pod",
"perlcyg.pod",
- "perlfaq3.pod",
+ "perlfaq.pod",
"perlvar.pod",
) {
my @out;
my $precooked = source_path($file);
- $precooked =~ s<\.pod><_out.txt>s;
+ $precooked =~ s<\.pod><o.txt>s;
unless(-e $precooked) {
ok 0;
print "# But $precooked doesn't exist!!\n";
}
my $here;
-if( -e ($here = source_path('test_lib'))) {
+if( -e ($here = source_path('testlib1'))) {
#
-} elsif(-e ($here = File::Spec->catdir($cwd, 't', 'test_lib'))) {
+} elsif(-e ($here = File::Spec->catdir($cwd, 't', 'testlib1'))) {
#
} else {
die "Can't find the test corpus";
{
my $names = join "|", sort values %$where2name;
-ok $names, "Blorm|Zonk::Pronk|hink_honk::Glunk|hink_honk::Vliff|perlfliff|perlthang|squaa|squaa::Glunk|squaa::Vliff|zikzik";
+ok $names, "Blorm|Zonk::Pronk|hinkhonk::Glunk|hinkhonk::Vliff|perlflif|perlthng|squaa|squaa::Glunk|squaa::Vliff|zikzik";
}
{
my $names = join "|", sort keys %$name2where;
-ok $names, "Blorm|Zonk::Pronk|hink_honk::Glunk|hink_honk::Vliff|perlfliff|perlthang|squaa|squaa::Glunk|squaa::Vliff|zikzik";
+ok $names, "Blorm|Zonk::Pronk|hinkhonk::Glunk|hinkhonk::Vliff|perlflif|perlthng|squaa|squaa::Glunk|squaa::Vliff|zikzik";
}
ok( ($name2where->{'squaa'} || 'huh???'), '/squaa\.pm$/');
}
my $here;
-if( -e ($here = source_path('test_lib'))) {
+if( -e ($here = source_path('testlib1'))) {
chdir $here;
-} elsif(-e ($here = File::Spec->catdir($cwd, 't', 'test_lib'))) {
+} elsif(-e ($here = File::Spec->catdir($cwd, 't', 'testlib1'))) {
chdir $here;
} else {
die "Can't find the test corpus";
{
my $names = join "|", sort values %$where2name;
-ok $names, "Blorm|Zonk::Pronk|hink_honk::Glunk|hink_honk::Vliff|perlfliff|perlthang|squaa|squaa::Glunk|squaa::Vliff|zikzik";
+ok $names, "Blorm|Zonk::Pronk|hinkhonk::Glunk|hinkhonk::Vliff|perlflif|perlthng|squaa|squaa::Glunk|squaa::Vliff|zikzik";
}
{
my $names = join "|", sort keys %$name2where;
-ok $names, "Blorm|Zonk::Pronk|hink_honk::Glunk|hink_honk::Vliff|perlfliff|perlthang|squaa|squaa::Glunk|squaa::Vliff|zikzik";
+ok $names, "Blorm|Zonk::Pronk|hinkhonk::Glunk|hinkhonk::Vliff|perlflif|perlthng|squaa|squaa::Glunk|squaa::Vliff|zikzik";
}
ok( ($name2where->{'squaa'} || 'huh???'), '/squaa\.pm$/');
}
my($here1, $here2);
-if( -e ($here1 = source_path('test_lib'))) {
+if( -e ($here1 = source_path('testlib1'))) {
die "But where's $here2?"
- unless -e ($here2 = source_path('other_test_lib'));
-} elsif( -e ($here1 = File::Spec->catdir($cwd, 't', 'test_lib' ))) {
+ unless -e ($here2 = source_path('testlib2'));
+} elsif( -e ($here1 = File::Spec->catdir($cwd, 't', 'testlib1' ))) {
die "But where's $here2?"
- unless -e ($here2 = File::Spec->catdir($cwd, 't', 'other_test_lib'));
+ unless -e ($here2 = File::Spec->catdir($cwd, 't', 'testlib2'));
} else {
die "Can't find the test corpora";
}
{
my $names = join "|", sort values %$where2name;
-ok $names, "Blorm|Sizzlesuzzle|Zonk::Pronk|hink_honk::Glunk|hink_honk::Vliff|perlfliff|perlthang|perlzuk|squaa|squaa::Glunk|squaa::Vliff|squaa::Wowo|zikzik";
+ok $names, "Blorm|Suzzle|Zonk::Pronk|hinkhonk::Glunk|hinkhonk::Vliff|perlflif|perlthng|perlzuk|squaa|squaa::Glunk|squaa::Vliff|squaa::Wowo|zikzik";
}
{
my $names = join "|", sort keys %$name2where;
-ok $names, "Blorm|Sizzlesuzzle|Zonk::Pronk|hink_honk::Glunk|hink_honk::Vliff|perlfliff|perlthang|perlzuk|squaa|squaa::Glunk|squaa::Vliff|squaa::Wowo|zikzik";
+ok $names, "Blorm|Suzzle|Zonk::Pronk|hinkhonk::Glunk|hinkhonk::Vliff|perlflif|perlthng|perlzuk|squaa|squaa::Glunk|squaa::Vliff|squaa::Wowo|zikzik";
}
ok( ($name2where->{'squaa'} || 'huh???'), '/squaa\.pm$/');
my($here1, $here2, $here3);
-if( -e ($here1 = source_path('test_lib' ))) {
+if( -e ($here1 = source_path('testlib1' ))) {
die "But where's $here2?"
- unless -e ($here2 = source_path('other_test_lib'));
+ unless -e ($here2 = source_path('testlib2'));
die "But where's $here3?"
- unless -e ($here3 = source_path('yet_another_test_lib'));
+ unless -e ($here3 = source_path('testlib3'));
-} elsif( -e ($here1 = File::Spec->catdir($cwd, 't', 'test_lib' ))) {
+} elsif( -e ($here1 = File::Spec->catdir($cwd, 't', 'testlib1' ))) {
die "But where's $here2?"
- unless -e ($here2 = File::Spec->catdir($cwd, 't', 'other_test_lib'));
+ unless -e ($here2 = File::Spec->catdir($cwd, 't', 'testlib2'));
die "But where's $here3?"
- unless -e ($here3 = File::Spec->catdir($cwd, 't', 'yet_another_test_lib'));
+ unless -e ($here3 = File::Spec->catdir($cwd, 't', 'testlib3'));
} else {
die "Can't find the test corpora";
{
print "# won't show any shadows, since we're just looking at the name2where keys\n";
my $names = join "|", sort keys %$name2where;
-ok $names, "Blorm|Sizzlesuzzle|Zonk::Pronk|hink_honk::Glunk|hink_honk::Vliff|perlfliff|perlthang|perlzuk|squaa|squaa::Glunk|squaa::Vliff|squaa::Wowo|zikzik";
+ok $names, "Blorm|Suzzle|Zonk::Pronk|hinkhonk::Glunk|hinkhonk::Vliff|perlflif|perlthng|perlzuk|squaa|squaa::Glunk|squaa::Vliff|squaa::Wowo|zikzik";
}
{
print "# but here we'll see shadowing:\n";
my $names = join "|", sort values %$where2name;
-ok $names, "Blorm|Sizzlesuzzle|Zonk::Pronk|hink_honk::Glunk|hink_honk::Glunk|hink_honk::Vliff|hink_honk::Vliff|perlfliff|perlthang|perlthang|perlzuk|squaa|squaa::Glunk|squaa::Vliff|squaa::Vliff|squaa::Vliff|squaa::Wowo|zikzik";
+ok $names, "Blorm|Suzzle|Zonk::Pronk|hinkhonk::Glunk|hinkhonk::Glunk|hinkhonk::Vliff|hinkhonk::Vliff|perlflif|perlthng|perlthng|perlzuk|squaa|squaa::Glunk|squaa::Vliff|squaa::Vliff|squaa::Vliff|squaa::Wowo|zikzik";
my %count;
for(values %$where2name) { ++$count{$_} };
#print pretty(\%count), "\n\n";
delete @count{ grep $count{$_} < 2, keys %count };
my $shadowed = join "|", sort keys %count;
-ok $shadowed, "hink_honk::Glunk|hink_honk::Vliff|perlthang|squaa::Vliff";
+ok $shadowed, "hinkhonk::Glunk|hinkhonk::Vliff|perlthng|squaa::Vliff";
sub thar { print "# Seen $_[0] :\n", map "# {$_}\n", sort grep $where2name->{$_} eq $_[0],keys %$where2name; return; }
-ok $count{'perlthang'}, 2;
-thar 'perlthang';
+ok $count{'perlthng'}, 2;
+thar 'perlthng';
ok $count{'squaa::Vliff'}, 3;
thar 'squaa::Vliff';
}
ok grep( m/squaa\.pm/, keys %$where2name ), 1;
-ok( ($name2where->{'perlthang'} || 'huh???'), '/[^\^]test_lib/' );
-ok( ($name2where->{'squaa::Vliff'} || 'huh???'), '/[^\^]test_lib/' );
+ok( ($name2where->{'perlthng'} || 'huh???'), '/[^\^]testlib1/' );
+ok( ($name2where->{'squaa::Vliff'} || 'huh???'), '/[^\^]testlib1/' );
# Some sanity:
-ok( ($name2where->{'squaa::Wowo'} || 'huh???'), '/other_test_lib/' );
+ok( ($name2where->{'squaa::Wowo'} || 'huh???'), '/testlib2/' );
my($here1, $here2, $here3);
-if( -e ($here1 = source_path( 'test_lib' ))) {
+if( -e ($here1 = source_path( 'testlib1' ))) {
die "But where's $here2?"
- unless -e ($here2 = source_path( 'other_test_lib'));
+ unless -e ($here2 = source_path( 'testlib2'));
die "But where's $here3?"
- unless -e ($here3 = source_path( 'yet_another_test_lib'));
+ unless -e ($here3 = source_path( 'testlib3'));
-} elsif( -e ($here1 = File::Spec->catdir($cwd, 't', 'test_lib' ))) {
+} elsif( -e ($here1 = File::Spec->catdir($cwd, 't', 'testlib1' ))) {
die "But where's $here2?"
- unless -e ($here2 = File::Spec->catdir($cwd, 't', 'other_test_lib'));
+ unless -e ($here2 = File::Spec->catdir($cwd, 't', 'testlib2'));
die "But where's $here3?"
- unless -e ($here3 = File::Spec->catdir($cwd, 't', 'yet_another_test_lib'));
+ unless -e ($here3 = File::Spec->catdir($cwd, 't', 'testlib3'));
} else {
die "Can't find the test corpora: $dir";
ok ! $name2where->{'squaa'}; # because squaa.pm isn't squaa::*
-ok( ($name2where->{'squaa::Vliff'} || 'huh???'), '/[^\^]test_lib/' );
+ok( ($name2where->{'squaa::Vliff'} || 'huh???'), '/[^\^]testlib1/' );
-ok( ($name2where->{'squaa::Wowo'} || 'huh???'), '/other_test_lib/' );
+ok( ($name2where->{'squaa::Wowo'} || 'huh???'), '/testlib2/' );
print "# OK, bye from ", __FILE__, "\n";
my($here1, $here2, $here3);
-if( -e ($here1 = source_path( 'test_lib' ))) {
+if( -e ($here1 = source_path( 'testlib1' ))) {
die "But where's $here2?"
- unless -e ($here2 = source_path ( 'other_test_lib'));
+ unless -e ($here2 = source_path ( 'testlib2'));
die "But where's $here3?"
- unless -e ($here3 = source_path( 'yet_another_test_lib'));
+ unless -e ($here3 = source_path( 'testlib3'));
-} elsif( -e ($here1 = File::Spec->catdir($cwd, 't', 'test_lib' ))) {
+} elsif( -e ($here1 = File::Spec->catdir($cwd, 't', 'testlib1' ))) {
die "But where's $here2?"
- unless -e ($here2 = File::Spec->catdir($cwd, 't', 'other_test_lib'));
+ unless -e ($here2 = File::Spec->catdir($cwd, 't', 'testlib2'));
die "But where's $here3?"
- unless -e ($here3 = File::Spec->catdir($cwd, 't', 'yet_another_test_lib'));
+ unless -e ($here3 = File::Spec->catdir($cwd, 't', 'testlib3'));
} else {
die "Can't find the test corpora";
{
my $names = join "|", sort keys %$name2where;
-ok $names, "Zonk::Pronk|hink_honk::Glunk|perlzuk|squaa::Glunk|zikzik";
+ok $names, "Zonk::Pronk|hinkhonk::Glunk|perlzuk|squaa::Glunk|zikzik";
}
{
my $names = join "|", sort values %$where2name;
-ok $names, "Zonk::Pronk|hink_honk::Glunk|hink_honk::Glunk|perlzuk|squaa::Glunk|zikzik";
+ok $names, "Zonk::Pronk|hinkhonk::Glunk|hinkhonk::Glunk|perlzuk|squaa::Glunk|zikzik";
}
print "# OK, bye from ", __FILE__, "\n";
my($here1, $here2, $here3);
-if( -e ($here1 = source_path( 'test_lib' ))) {
+if( -e ($here1 = source_path( 'testlib1' ))) {
die "But where's $here2?"
- unless -e ($here2 = source_path( 'other_test_lib'));
+ unless -e ($here2 = source_path( 'testlib2'));
die "But where's $here3?"
- unless -e ($here3 = source_path( 'yet_another_test_lib'));
+ unless -e ($here3 = source_path( 'testlib3'));
-} elsif( -e ($here1 = File::Spec->catdir($cwd, 't', 'test_lib' ))) {
+} elsif( -e ($here1 = File::Spec->catdir($cwd, 't', 'testlib1' ))) {
die "But where's $here2?"
- unless -e ($here2 = File::Spec->catdir($cwd, 't', 'other_test_lib'));
+ unless -e ($here2 = File::Spec->catdir($cwd, 't', 'testlib2'));
die "But where's $here3?"
- unless -e ($here3 = File::Spec->catdir($cwd, 't', 'yet_another_test_lib'));
+ unless -e ($here3 = File::Spec->catdir($cwd, 't', 'testlib3'));
} else {
die "Can't find the test corpora";
ok $name2where->{'squaa'}; # because squaa.pm IS squaa*
-ok( ($name2where->{'squaa::Vliff'} || 'huh???'), '/[^\^]test_lib/' );
+ok( ($name2where->{'squaa::Vliff'} || 'huh???'), '/[^\^]testlib1/' );
-ok( ($name2where->{'squaa::Wowo'} || 'huh???'), '/other_test_lib/' );
+ok( ($name2where->{'squaa::Wowo'} || 'huh???'), '/testlib2/' );
print "# OK, bye from ", __FILE__, "\n";
my($here1, $here2, $here3);
-if( -e ($here1 = source_path( 'test_lib' ))) {
+if( -e ($here1 = source_path( 'testlib1' ))) {
die "But where's $here2?"
- unless -e ($here2 = source_path( 'other_test_lib'));
+ unless -e ($here2 = source_path( 'testlib2'));
die "But where's $here3?"
- unless -e ($here3 = source_path( 'yet_another_test_lib'));
+ unless -e ($here3 = source_path( 'testlib3'));
-} elsif( -e ($here1 = File::Spec->catdir($cwd, 't', 'test_lib' ))) {
+} elsif( -e ($here1 = File::Spec->catdir($cwd, 't', 'testlib1' ))) {
die "But where's $here2?"
- unless -e ($here2 = File::Spec->catdir($cwd, 't', 'other_test_lib'));
+ unless -e ($here2 = File::Spec->catdir($cwd, 't', 'testlib2'));
die "But where's $here3?"
- unless -e ($here3 = File::Spec->catdir($cwd, 't', 'yet_another_test_lib'));
+ unless -e ($here3 = File::Spec->catdir($cwd, 't', 'testlib3'));
} else {
die "Can't find the test corpora";
my($here1, $here2, $here3);
-if( -e ($here1 = source_path( 'test_lib' ))) {
+if( -e ($here1 = source_path( 'testlib1' ))) {
die "But where's $here2?"
- unless -e ($here2 = source_path( 'other_test_lib'));
+ unless -e ($here2 = source_path( 'testlib2'));
die "But where's $here3?"
- unless -e ($here3 = source_path( 'yet_another_test_lib'));
+ unless -e ($here3 = source_path( 'testlib3'));
-} elsif( -e ($here1 = File::Spec->catdir($cwd, 't', 'test_lib' ))) {
+} elsif( -e ($here1 = File::Spec->catdir($cwd, 't', 'testlib1' ))) {
die "But where's $here2?"
- unless -e ($here2 = File::Spec->catdir($cwd, 't', 'other_test_lib'));
+ unless -e ($here2 = File::Spec->catdir($cwd, 't', 'testlib2'));
die "But where's $here3?"
- unless -e ($here3 = File::Spec->catdir($cwd, 't', 'yet_another_test_lib'));
+ unless -e ($here3 = File::Spec->catdir($cwd, 't', 'testlib3'));
} else {
die "Can't find the test corpora";