From: Steve Peters Date: Fri, 23 Mar 2007 01:47:41 +0000 (+0000) Subject: Additional test file edits needed for Pod-Simple-3.05 that couldn't X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9b134129b37f0ac68efe970f543cccef309944c6;p=p5sagit%2Fp5-mst-13.2.git Additional test file edits needed for Pod-Simple-3.05 that couldn't be included due to the integrates being performed in the previous change. p4raw-id: //depot/perl@30707 --- diff --git a/lib/Pod/Simple/t/htmlbat.t b/lib/Pod/Simple/t/htmlbat.t index 098b21f..497f0e5 100644 --- a/lib/Pod/Simple/t/htmlbat.t +++ b/lib/Pod/Simple/t/htmlbat.t @@ -1,3 +1,4 @@ +# Testing HTMLBatch BEGIN { if($ENV{PERL_CORE}) { chdir 't'; @@ -33,7 +34,7 @@ foreach my $t_maybe ( 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; } diff --git a/lib/Pod/Simple/t/render.t b/lib/Pod/Simple/t/render.t index 81ba12e..ae7b8f4 100644 --- a/lib/Pod/Simple/t/render.t +++ b/lib/Pod/Simple/t/render.t @@ -1,7 +1,9 @@ BEGIN { - chdir 't'; if($ENV{PERL_CORE}) { + chdir 't'; @INC = '../lib'; + } else { + push @INC, '../lib'; } } @@ -20,6 +22,8 @@ BEGIN { $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}) { @@ -38,7 +42,7 @@ foreach my $file ( "junk1.pod", "junk2.pod", "perlcyg.pod", - "perlfaq3.pod", + "perlfaq.pod", "perlvar.pod", ) { @@ -50,7 +54,7 @@ foreach my $file ( my @out; my $precooked = source_path($file); - $precooked =~ s<\.pod><_out.txt>s; + $precooked =~ s<\.pod>s; unless(-e $precooked) { ok 0; print "# But $precooked doesn't exist!!\n"; diff --git a/lib/Pod/Simple/t/search10.t b/lib/Pod/Simple/t/search10.t index cf34413..c69334b 100644 --- a/lib/Pod/Simple/t/search10.t +++ b/lib/Pod/Simple/t/search10.t @@ -43,9 +43,9 @@ sub source_path { } 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"; @@ -68,12 +68,12 @@ print $p; { 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$/'); diff --git a/lib/Pod/Simple/t/search12.t b/lib/Pod/Simple/t/search12.t index fb2daa2..4f620c0 100644 --- a/lib/Pod/Simple/t/search12.t +++ b/lib/Pod/Simple/t/search12.t @@ -36,9 +36,9 @@ sub source_path { } 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"; @@ -61,12 +61,12 @@ print $p; { 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$/'); diff --git a/lib/Pod/Simple/t/search20.t b/lib/Pod/Simple/t/search20.t index bfea22e..52c6c36 100644 --- a/lib/Pod/Simple/t/search20.t +++ b/lib/Pod/Simple/t/search20.t @@ -40,12 +40,12 @@ sub source_path { } 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"; } @@ -69,12 +69,12 @@ print $p; { 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$/'); diff --git a/lib/Pod/Simple/t/search22.t b/lib/Pod/Simple/t/search22.t index d61187e..05157b7 100644 --- a/lib/Pod/Simple/t/search22.t +++ b/lib/Pod/Simple/t/search22.t @@ -37,17 +37,17 @@ sub source_path { 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"; @@ -71,25 +71,25 @@ print $p; { 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'; } @@ -99,11 +99,11 @@ ok( ($name2where->{'squaa'} || 'huh???'), '/squaa\.pm$/'); 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/' ); diff --git a/lib/Pod/Simple/t/search25.t b/lib/Pod/Simple/t/search25.t index eee796a..7704503 100644 --- a/lib/Pod/Simple/t/search25.t +++ b/lib/Pod/Simple/t/search25.t @@ -40,17 +40,17 @@ sub source_path { 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"; @@ -100,9 +100,9 @@ thar 'squaa::Vliff'; 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"; diff --git a/lib/Pod/Simple/t/search26.t b/lib/Pod/Simple/t/search26.t index 800302c..fb9d322 100644 --- a/lib/Pod/Simple/t/search26.t +++ b/lib/Pod/Simple/t/search26.t @@ -43,17 +43,17 @@ sub source_path { 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"; @@ -80,12 +80,12 @@ print $p; { 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"; diff --git a/lib/Pod/Simple/t/search27.t b/lib/Pod/Simple/t/search27.t index d9d0458..22cf32d 100644 --- a/lib/Pod/Simple/t/search27.t +++ b/lib/Pod/Simple/t/search27.t @@ -37,17 +37,17 @@ sub source_path { 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"; @@ -97,9 +97,9 @@ thar 'squaa::Vliff'; 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"; diff --git a/lib/Pod/Simple/t/search28.t b/lib/Pod/Simple/t/search28.t index a9414af..9301232 100644 --- a/lib/Pod/Simple/t/search28.t +++ b/lib/Pod/Simple/t/search28.t @@ -37,17 +37,17 @@ sub source_path { 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"; diff --git a/lib/Pod/Simple/t/search29.t b/lib/Pod/Simple/t/search29.t index 9f3c2f5..c62befb 100644 --- a/lib/Pod/Simple/t/search29.t +++ b/lib/Pod/Simple/t/search29.t @@ -37,17 +37,17 @@ sub source_path { 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";