summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Signes <rjbs@cpan.org>2012-03-12 13:19:23 -0400
committerRicardo Signes <rjbs@cpan.org>2012-03-12 13:25:23 -0400
commitd1a30ea2dc426e354909eff54f683522681ab603 (patch)
tree8f5b08f93bac1738615642be287cd2010136dc59
parent495a00a19fe0c6e9948090f8539f58599860bd4d (diff)
downloadperl-smoke-me/pod-html.tar.gz
make the pod2html tests work with fs with volssmoke-me/pod-html
my $cwd = Cwd::cwd(); my $new_dir = catdir $cwd, "t"; my $infile = catfile $new_dir, "$podfile.pod"; Prior to these changes, we were getting the volume from $cwd, above, and then basically ignoring it. When the cwd was c:\foo, ignoring the volume in the catdir/catfile operations would munge things to C:\foo, which meant that later a native check of path prefix would fail: C:\foo is not a prefix of c:\foo\bar because of the case difference in the volume name. The is a legitimate fix, but the code is still problematic in other places because (a) it tends to do path operations with no consideration for volumes and (b) it has at least one place where it decides whether path X is below path Y by using substr/index instead of path checking routines.
-rw-r--r--ext/Pod-Html/t/pod2html-lib.pl10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/Pod-Html/t/pod2html-lib.pl b/ext/Pod-Html/t/pod2html-lib.pl
index 0327e2bde3..b7067daaec 100644
--- a/ext/Pod-Html/t/pod2html-lib.pl
+++ b/ext/Pod-Html/t/pod2html-lib.pl
@@ -33,11 +33,11 @@ sub convert_n_test {
my $cwd = Cwd::cwd();
my ($vol, $dir) = splitpath($cwd, 1);
my $relcwd = substr($dir, length(File::Spec->rootdir()));
-
- my $new_dir = catdir $cwd, "t";
- my $infile = catfile $new_dir, "$podfile.pod";
- my $outfile = catfile $new_dir, "$podfile.html";
-
+
+ my $new_dir = catdir $dir, "t";
+ my $infile = catpath $vol, $new_dir, "$podfile.pod";
+ my $outfile = catpath $vol, $new_dir, "$podfile.html";
+
# To add/modify args to p2h, use @p2h_args
Pod::Html::pod2html(
"--infile=$infile",