diff options
author | Ricardo Signes <rjbs@cpan.org> | 2012-02-21 22:54:58 -0500 |
---|---|---|
committer | Ricardo Signes <rjbs@cpan.org> | 2012-02-21 23:42:35 -0500 |
commit | 83f6fd9ff6f14d4a5860f024047acdd235268d52 (patch) | |
tree | 98d2a37a1acb69f1c4f3a4ef5283504faefabe5a /ext | |
parent | b581a1f73be55ae99bb4ce6f49883b0b717b5142 (diff) | |
download | perl-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...
Diffstat (limited to 'ext')
-rw-r--r-- | ext/Pod-Html/t/crossref3.t | 8 | ||||
-rw-r--r-- | ext/Pod-Html/t/pod2html-lib.pl | 1 |
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">"section1"</a></p> -<p><a href="/[RELCURRENTWORKINGDIRECTORY]/t/htmllink.html#section-2">"section 2" in htmllink</a></p> +<p><a href="[ABSCURRENTWORKINGDIRECTORY]/t/htmllink.html#section-2">"section 2" in htmllink</a></p> <p><a href="#item1">"item1"</a></p> <p><a href="#non-existant-section">"non existant section"</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-">"$"" in var-copy</a></p> +<p><a href="[ABSCURRENTWORKINGDIRECTORY]/testdir/test.lib/var-copy.html#pod-">"$"" in var-copy</a></p> <p><code>var-copy</code></p> <p><code>var-copy/$"</code></p> -<p><a href="/[RELCURRENTWORKINGDIRECTORY]/testdir/test.lib/podspec-copy.html#First:">"First:" in podspec-copy</a></p> +<p><a href="[ABSCURRENTWORKINGDIRECTORY]/testdir/test.lib/podspec-copy.html#First:">"First:" 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/; } |