Re: [perl #17934] tied STDERR and internal warnings
[p5sagit/p5-mst-13.2.git] / t / pod / find.t
index 3a0b274..4018461 100644 (file)
@@ -1,6 +1,15 @@
 # Testing of Pod::Find
 # Author: Marek Rouchal <marek@saftsack.fs.uni-bayreuth.de>
 
+BEGIN {
+    chdir 't' if -d 't';
+    # The ../../../../../lib is for finding lib/utf8.pm
+    # when running under all-utf8 settings (pod/find.t)
+    # does not directly require lib/utf8.pm but regular
+    # expressions will need that.
+    @INC = qw(../lib ../../../../../lib);
+}
+
 $| = 1;
 
 use Test;
@@ -8,27 +17,6 @@ use Test;
 BEGIN { 
   plan tests => 4; 
   use File::Spec;
-  if ($^O eq 'VMS') {
-     # This magick is needed to make the VMS I/O system to believe
-     # that there's life after eight directory levels (this makes
-     # it believe there's life until sixteen levels).  The filesystem
-     # has no limitation as such.
-     $DEFAULT_DIR = $ENV{'DEFAULT'};
-     my $here = $DEFAULT_DIR;
-     my ($dev,$dir) = File::Spec->splitpath($here);
-     $dev =~ s/:$//;
-     $dev = $ENV{$dev} if exists($ENV{$dev});
-     $dev .= ':' if $dev !~ /:/;
-     $here = File::Spec->canonpath($dev.$dir);
-     $here =~ s/\]$/.]/;
-     system "define/nolog/job/trans=conceal temp_perl_base $here";
-     chdir('temp_perl_base:[000000]');
-  }
-}
-
-END {
-    chdir($DEFAULT_DIR) if $^O eq 'VMS';
-    system "deassign/job temp_perl_base";
 }
 
 use Pod::Find qw(pod_find pod_where);
@@ -49,16 +37,14 @@ my %pods = pod_find($lib_dir);
 my $result = join(',', sort values %pods);
 my $compare = join(',', sort qw(
     Pod::Stuff
-    Pod::Rhubarb
-    Like::And::Yeah
 ));
 if ($^O eq 'VMS') {
     $compare = lc($compare);
-    $result = join(',', sort values %pods);
     my $undollared = $Qlib_dir;
     $undollared =~ s/\$/\\\$/g;
     $undollared =~ s/\-/\\\-/g;
     $result =~ s/$undollared/pod::/g;
+    $result =~ s/\$//g;
     my $count = 0;
     my @result = split(/,/,$result);
     my @compare = split(/,/,$compare);
@@ -67,6 +53,9 @@ if ($^O eq 'VMS') {
     }
     ok($count/($#result+1)-1,$#compare);
 }
+elsif ($^O eq 'dos') {
+    ok(lc $result,lc $compare);
+}
 else {
     ok($result,$compare);
 }