Subject: | [PATCH] VMS nits in source.t |
This test has been failing on VMS since 3.22 came into core (yeah, awhile ago). The attached
patch makes two small changes that clear the smoke:
1.) If the directory name passed to assemble_meta() is in native format (which is what's
returned from F::S::catdir), we were getting an empty basename in the returned metadata
because there is no basename on a directory. '[.t.source_tests]' is logically equivalent to
't/source_tests/' (with the trailing slash), but on VMS the trailing delimiter is non-optional. In
other words, basenames on directories stand on shaky ground; without the trailing delimiter
you get the bare directory name, but with the trailing delimiter (which is required on VMS)
you get nothing. The patch dodges the issue by explicitly specifying the directory in Unix
format.
2.) Symlinks exist on recent versions of VMS, but in various ways are not ready for
primetime. For example, a link can't point to an absolute path without a special
environment's being set up. So I think the better part of valor is to skip those tests for now.
Patch is against core so apply with -p2.
Subject: | source_t.patch |
--- cpan/Test-Harness/t/source.t;-0 2010-08-16 11:07:13 -0500
+++ cpan/Test-Harness/t/source.t 2010-12-30 08:24:22 -0600
@@ -9,10 +9,7 @@ use strict;
use Test::More tests => 45;
use File::Spec;
-my $dir = File::Spec->catdir(
- 't',
- 'source_tests'
-);
+my $dir = 't/source_tests';
use_ok('TAP::Parser::Source');
@@ -236,6 +233,7 @@ sub ct($) {
# symlink test
SKIP: {
my $symlink_exists = eval { symlink( '', '' ); 1 };
+ $symlink_exists = 0 if $^O eq 'VMS'; # exists but not ready for prime time
skip 'symlink not supported on this platform', 9 unless $symlink_exists;
my $test = File::Spec->catfile( $dir, 'source.t' );