This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #113926] fix a hash randomization bug
[perl5.git] / ext / Pod-Html / t / htmldir1.t
index a0e747f..8dd2854 100644 (file)
@@ -10,7 +10,6 @@ END {
 
 use strict;
 use Cwd;
-use File::Spec;
 use File::Spec::Functions;
 use Test::More tests => 2;
 
@@ -22,24 +21,29 @@ SKIP: {
     skip "$output", 2 if $output;
 
     my ($v, $d) = splitpath(cwd(), 1);
-    my $relcwd = substr($d, length(File::Spec->rootdir()));
+    my @dirs = splitdir($d);
+    shift @dirs if $dirs[0] eq '';
+    my $relcwd = join '/', @dirs;
 
     my $data_pos = tell DATA; # to read <DATA> twice
 
 
     convert_n_test("htmldir1", "test --htmldir and --htmlroot 1a", 
-     "--podpath=". catdir($relcwd, 't') . ":" . catfile($relcwd, 'testdir/test.lib'),
-     "--podroot=$v". File::Spec->rootdir,
+     "--podpath=". File::Spec::Unix->catdir($relcwd, 't') . ":"
+                 . File::Spec::Unix->catdir($relcwd, 'testdir/test.lib'),
+     "--podroot=". catpath($v, '/', ''),
      "--htmldir=t",
+     "--quiet",
     );
 
     seek DATA, $data_pos, 0; # to read <DATA> twice (expected output is the same)
 
     convert_n_test("htmldir1", "test --htmldir and --htmlroot 1b", 
      "--podpath=$relcwd",
-     "--podroot=$v". File::Spec->rootdir,
-     "--htmldir=". catfile $relcwd, 't',
+     "--podroot=". catpath($v, '/', ''),
+     "--htmldir=". catdir($relcwd, 't'),
      "--htmlroot=/",
+     "--quiet",
     );
 }
 
@@ -68,6 +72,8 @@ __DATA__
 
 <h1 id="LINKS">LINKS</h1>
 
+<pre><code>  Verbatim B&lt;means&gt; verbatim.</code></pre>
+
 <p>Normal text, a <a>link</a> to nowhere,</p>
 
 <p>a link to <a href="/[RELCURRENTWORKINGDIRECTORY]/testdir/test.lib/var-copy.html">var-copy</a>,</p>