Three minor changes to get the op/misc.t test working on VMS:
o clean up multiple version#s of tempfiles
o VMS needs to use NL: rather than /dev/null
o when we open a file on VMS, we (by default) lock it against
other read/write access, so the -r test fails.
Because this particular test script uses static data to define the tests
to be run, the modifications are in the form of string substitutions.
Kinda ugly, but it works.
Oh yes, modify vms/test.com so that op/misc.t is no longer excluded.
diff -uBb t/op/misc.t-orig t/op/misc.t
--- t/op/misc.t-orig Mon Jan 8 17:31:04 2001
+++ t/op/misc.t Mon Jan 8 17:19:33 2001
@@ -15,7 +15,7 @@
$tmpfile = "misctmp000";
1 while -f ++$tmpfile;
-END { unlink $tmpfile if $tmpfile; }
+END { while($tmpfile && unlink $tmpfile){} }
$CAT = (($^O eq 'MSWin32') ? '.\perl -e "print <>"' : 'cat');
@@ -26,6 +26,9 @@
}
my($prog,$expected) = split(/\nEXPECT\n/, $_);
open TEST, ">$tmpfile" or die "Cannot open $tmpfile: $!";
+ $prog =~ s#/dev/null#NL:# if $^O eq 'VMS';
+ $prog =~ s#if \(-e _ and -f _ and -r _\)#if (-e _ and -f _)# if $^O eq 'VMS'; #
+VMS file locking
+
print TEST $prog, "\n";
close TEST or die "Cannot close $tmpfile: $!";
diff -uBb vms/test.com-orig vms/test.com
--- vms/test.com-orig Mon Jan 8 17:31:29 2001
+++ vms/test.com Mon Jan 8 17:31:24 2001
@@ -126,7 +126,7 @@
# insists on stat()ing a file descriptor before it'll use it.
push(@libexcl,'io_xs.t') if $Config{'vms_cc_type'} ne 'decc';
-@opexcl=('die_exit.t','exec.t','fork.t','glob.t','groups.t','magic.t','misc.t','stat.t');
+@opexcl=('die_exit.t','exec.t','fork.t','glob.t','groups.t','magic.t','stat.t');
@exclist=(@compexcl,@ioexcl,@libexcl,@opexcl);
foreach $file (@exclist) { $skip{$file}++; }
--
Drexel University \V --Chuck Lane
======]---------->--------*------------<-------[===========
(215) 895-1545 _/ \ Particle Physics
FAX: (215) 895-5934 /\ /~~~~~~~~~~~ [EMAIL PROTECTED]