Subject: | [PATCH] get globmapper tests working on VMS |
The tests and test infrastructure for the new globmapper feature have expectations about Unix
filename syntax rather deeply embedded in them, but on VMS, File::Temp returns directory
names in native syntax, which leads to a slew of test failures.
The least intrusive thing to do seems to be to convert temp directory names to Unix syntax at
their source in the LexDir package in CompTestUtils.pm on VMS only. The attached patch does
that and gets all tests passing again.
Subject: | vms_ioc_unixify.patch |
--- t/compress/CompTestUtils.pm;-0 2011-06-09 06:18:36 -0500
+++ t/compress/CompTestUtils.pm 2011-06-18 16:53:47 -0500
@@ -83,6 +83,12 @@ BEGIN {
{
Carp::croak "NO!!!!" if defined $_;
$_ = File::Temp->newdir(DIR => '.');
+ # Subsequent manipulations assume Unix syntax, metacharacters, etc.
+ if ($^O eq 'VMS')
+ {
+ $_->{DIRNAME} = VMS::Filespec::unixify($_->{DIRNAME});
+ $_->{DIRNAME} =~ s/\/$//;
+ }
}
bless [ @_ ], $self ;
}
@@ -92,6 +98,12 @@ BEGIN {
{
Carp::croak "NO!!!!" if defined $_;
$_ = File::Temp::tempdir(DIR => '.', CLEANUP => 1);
+ # Subsequent manipulations assume Unix syntax, metacharacters, etc.
+ if ($^O eq 'VMS')
+ {
+ $_ = VMS::Filespec::unixify($_);
+ $_ =~ s/\/$//;
+ }
}
bless [ @_ ], $self ;
}