I've made some progress getting this test to run (see working patch below) 
but I still get one failure:

not ok 28 # POSIX::errno(): 20, $!: not a directory

20 is the correct value for ENOTDIR, but how can POSIX::errno() and $! be 
expected to be numerically equal when $! returns a string?  Or is it really 
just checking to see if errno has not been set?


--- ext/POSIX/t/posix.t;-0      Sun Oct 14 23:00:35 2001
+++ ext/POSIX/t/posix.t Tue Nov  6 13:33:28 2001
@@ -20,10 +20,11 @@
 $Is_W32 = $^O eq 'MSWin32';
 $Is_NetWare = $^O eq 'NetWare';
 $Is_Dos = $^O eq 'dos';
 $Is_MPE = $^O eq 'mpeix';
 $Is_MacOS = $^O eq 'MacOS';
+$Is_VMS = $^O eq 'VMS';
 
 $testfd = open("TEST", O_RDONLY, 0) and print "ok 1\n";
 read($testfd, $buffer, 9) if $testfd > 2;
 print $buffer eq "#!./perl\n" ? "ok 2\n" : "not ok 2\n";
 
@@ -93,10 +94,12 @@
 }
 
 my $pat;
 if ($Is_MacOS) {
     $pat = qr/:t:$/;
+} elsif ($Is_VMS) {
+    $pat = qr/.t]$/i;
 } else {
     $pat = qr#[\\/]t$#i;
 }
 print getcwd() =~ $pat ? "ok 13\n" : "not ok 13\n";
 
@@ -164,17 +167,17 @@
        # errno() looks at $! to generate its result.
        # Autoloading should not munge the value.
        my $foo  = $!;
        my $errno = POSIX::errno();
        print "not " unless $errno == $foo;
-       print "ok ", 28 + $test, "\n";
+       print "ok ", 28 + $test, " # POSIX::errno(): $errno, \$!: $!\n";
     }
 }
 
 $| = 0;
 # The following line assumes buffered output, which may be not true:
-print '@#!*$@(!@#$' unless ($Is_MacOS || $^O eq 'os2' ||
+print '@#!*$@(!@#$' unless ($Is_MacOS || $^O eq 'os2' || $Is_VMS ||
                             $^O eq 'uwin' || $^O eq 'os390' ||
                            (defined $ENV{PERLIO} &&
                             $ENV{PERLIO} eq 'unix' &&
                             $Config::Config{useperlio}));
 _exit(0);


Reply via email to