summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Signes <rjbs@cpan.org>2012-02-21 22:54:58 -0500
committerRicardo Signes <rjbs@cpan.org>2012-02-21 23:42:35 -0500
commit83f6fd9ff6f14d4a5860f024047acdd235268d52 (patch)
tree98d2a37a1acb69f1c4f3a4ef5283504faefabe5a
parentb581a1f73be55ae99bb4ce6f49883b0b717b5142 (diff)
downloadperl-83f6fd9ff6f14d4a5860f024047acdd235268d52.tar.gz
don't assume that filesys starts at / in Pod-Html
The test expectations for the --htmlroot feature wanted to look for an absolute path, so it concatenated / with the relative-to-root path. That failed on Win32, where the cwd was C:\etc I added a new token to the test-expectations-munger for the absolute cwd. I'm not 100% sure about the features' behavior, but the tests are now less platform-specific. I look forward to input on whether the code is doing the right thing now...
-rw-r--r--ext/Pod-Html/t/crossref3.t8
-rw-r--r--ext/Pod-Html/t/pod2html-lib.pl1
2 files changed, 5 insertions, 4 deletions
diff --git a/ext/Pod-Html/t/crossref3.t b/ext/Pod-Html/t/crossref3.t
index fc1983c87a..309d5ed888 100644
--- a/ext/Pod-Html/t/crossref3.t
+++ b/ext/Pod-Html/t/crossref3.t
@@ -60,21 +60,21 @@ __DATA__
<p><a href="#section1">&quot;section1&quot;</a></p>
-<p><a href="/[RELCURRENTWORKINGDIRECTORY]/t/htmllink.html#section-2">&quot;section 2&quot; in htmllink</a></p>
+<p><a href="[ABSCURRENTWORKINGDIRECTORY]/t/htmllink.html#section-2">&quot;section 2&quot; in htmllink</a></p>
<p><a href="#item1">&quot;item1&quot;</a></p>
<p><a href="#non-existant-section">&quot;non existant section&quot;</a></p>
-<p><a href="/[RELCURRENTWORKINGDIRECTORY]/testdir/test.lib/var-copy.html">var-copy</a></p>
+<p><a href="[ABSCURRENTWORKINGDIRECTORY]/testdir/test.lib/var-copy.html">var-copy</a></p>
-<p><a href="/[RELCURRENTWORKINGDIRECTORY]/testdir/test.lib/var-copy.html#pod-">&quot;$&quot;&quot; in var-copy</a></p>
+<p><a href="[ABSCURRENTWORKINGDIRECTORY]/testdir/test.lib/var-copy.html#pod-">&quot;$&quot;&quot; in var-copy</a></p>
<p><code>var-copy</code></p>
<p><code>var-copy/$&quot;</code></p>
-<p><a href="/[RELCURRENTWORKINGDIRECTORY]/testdir/test.lib/podspec-copy.html#First:">&quot;First:&quot; in podspec-copy</a></p>
+<p><a href="[ABSCURRENTWORKINGDIRECTORY]/testdir/test.lib/podspec-copy.html#First:">&quot;First:&quot; in podspec-copy</a></p>
<p><code>podspec-copy/First:</code></p>
diff --git a/ext/Pod-Html/t/pod2html-lib.pl b/ext/Pod-Html/t/pod2html-lib.pl
index 1567b3342f..1b2da25dea 100644
--- a/ext/Pod-Html/t/pod2html-lib.pl
+++ b/ext/Pod-Html/t/pod2html-lib.pl
@@ -56,6 +56,7 @@ sub convert_n_test {
$expect = <DATA>;
$expect =~ s/\[PERLADMIN\]/$Config::Config{perladmin}/;
$expect =~ s/\[RELCURRENTWORKINGDIRECTORY\]/$relcwd/g;
+ $expect =~ s/\[ABSCURRENTWORKINGDIRECTORY\]/$cwd/g;
if (ord("A") == 193) { # EBCDIC.
$expect =~ s/item_mat_3c_21_3e/item_mat_4c_5a_6e/;
}