diff options
author | Craig A. Berry <craigberry@mac.com> | 2013-01-04 17:41:17 -0600 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2013-01-06 16:30:03 -0600 |
commit | 30c56e34c6955d703838cc0ce41e8e17723f11ea (patch) | |
tree | 1d81c53ad24c9c0b5d16ea02e80535d96be85f13 /ext/Pod-Html/t/crossref2.t | |
parent | 83799784cb180c4b27a23e2ba1a77e8ec80ec76a (diff) | |
download | perl-30c56e34c6955d703838cc0ce41e8e17723f11ea.tar.gz |
Pod::Html test portability redux.
The flurry of activity to get these tests passing in the lead-up to
5.16.0 swept several issues under the rug. In particular, some
of the tests had failures on VMS that became invisible once we
started skipping them wherever dots are not allowed in directory
names (which is true by default on VMS now, but is likely to change
very shortly).
The facts behind my changes, in no particular order:
File::Spec->rootdir() returns, on VMS, a a special string that will
not be found in any actual pathname, so taking the length of it and
stripping that much off the front of an actual pathname produces
garbage.
File::Spec->rootdir(), on VMS, returns a string that contains a volume
specification, so simply prepending a volume to it produces garbage.
To portably produce a complete path, use catpath().
Windows appears not to care which direction the slashes are leaning,
and VMS can handle pure-Unix paths as long as they aren't pasted onto
components of native paths, so it's reasonbly safe to obtain directory
components with splitdir, and join them together with forward slashes.
The tests pass a value to --podpath that is not absolute, but nor
is it relative in the usual sense. It's apparently intended to be
relative to the filesystem root, which is an inherently non-portable
concept as neither Windows nor VMS has such a thing. The best that
can be done (without a complete rethink of the tests and perhaps the
module) is to make it relative to the top-level directory on the
current volume.
This gets all tests passing on Windows, VMS, and OS X.
Diffstat (limited to 'ext/Pod-Html/t/crossref2.t')
-rw-r--r-- | ext/Pod-Html/t/crossref2.t | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/ext/Pod-Html/t/crossref2.t b/ext/Pod-Html/t/crossref2.t index ce8fd6f804..4d8b03f6ca 100644 --- a/ext/Pod-Html/t/crossref2.t +++ b/ext/Pod-Html/t/crossref2.t @@ -10,8 +10,6 @@ END { use strict; use Cwd; -use File::Spec; -use File::Spec::Functions; use Test::More tests => 1; SKIP: { |