Update several test cases to not generate failures on VOS.
authorPaul Green <Paul.Green@stratus.com>
Thu, 10 Nov 2011 22:34:19 +0000 (17:34 -0500)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 18 Nov 2011 22:58:10 +0000 (14:58 -0800)
cpan/Time-Piece/t/02core.t
ext/Socket/t/Socket.t
lib/File/Compare.t
lib/File/Copy.t
t/lib/dbmt_common.pl
t/porting/exec-bit.t

index 8a0673e..1e8d264 100644 (file)
@@ -2,6 +2,7 @@ use Test::More tests => 95;
 
 my $is_win32 = ($^O =~ /Win32/);
 my $is_qnx = ($^O eq 'qnx');
+my $is_vos = ($^O eq 'vos');
 BEGIN { use_ok('Time::Piece'); }
 ok(1);
 
@@ -113,7 +114,7 @@ SKIP: {
 cmp_ok($t->strftime('%U'), 'eq', '09'); # Sun cmp Mon
 
 SKIP: {
-    skip "can't strftime %V on Win32 or QNX", 1 if $is_win32 or $is_qnx;
+    skip "can't strftime %V on Win32 or QNX or VOS", 1 if $is_win32 or $is_qnx or $is_vos;
     # is this test really broken on Mac OS? -- rjbs, 2006-02-08
     cmp_ok($t->strftime('%V'), 'eq', '09'); # Sun cmp Mon
 }
index d289f10..326fa7a 100644 (file)
@@ -179,7 +179,12 @@ if ($^O eq 'linux') {
 if($Config{d_inetntop} && $Config{d_inetaton}){
     print ((inet_ntop(AF_INET, inet_pton(AF_INET, "10.20.30.40")) eq "10.20.30.40") ? "ok 19\n" : "not ok 19\n");
     print ((inet_ntop(AF_INET, inet_aton("10.20.30.40")) eq "10.20.30.40") ? "ok 20\n" : "not ok 20\n");
-    print (lc(inet_ntop(AF_INET6, inet_pton(AF_INET6, "2001:503:BA3E::2:30")) eq "2001:503:ba3e::2:30") ? "ok 21\n" : "not ok 21\n");
+    if(defined eval { AF_INET6() } ) {
+        print (lc(inet_ntop(AF_INET6, inet_pton(AF_INET6, "2001:503:BA3E::2:30")) eq "2001:503:ba3e::2:30") ? "ok 21\n" : "not ok 21\n");
+    }
+    else {
+        print "ok 21 - skipped - no AF_INET6\n";
+    }
 } else {
     # no IPv6 
     print "ok $_ - skipped on this platform\n" for 19 .. 21;
index 7a31af6..1b7d038 100644 (file)
@@ -112,6 +112,7 @@ if (@donetests == 3) {
   print "not " unless $donetests[2] == 0;
   print "ok 13 # ";
   print "TODO" if $^O eq "cygwin"; # spaces after filename silently trunc'd
+  print "TODO" if $^O eq "vos"; # spaces after filename silently trunc'd
   print " file/fileCR [$donetests[2]]\n";
 }
 else {
index 63c99d1..ffd3d59 100644 (file)
@@ -265,6 +265,8 @@ SKIP: {
           if $^O eq 'VMS';
     skip "Copy doesn't set file permissions correctly on Win32.",  $skips
           if $^O eq "MSWin32";
+    skip "Copy maps POSIX permissions to VOS permissions.", $skips
+          if $^O eq "vos";
 
     # Just a sub to get better failure messages.
     sub __ ($) {
index b7d8c2e..5d4098c 100644 (file)
@@ -43,7 +43,7 @@ if (! -e $Dfile) {
 }
 SKIP: {
     skip "different file permission semantics on $^O", 1
-       if $^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'dos' || $^O eq 'cygwin';
+       if $^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'dos' || $^O eq 'cygwin' || $^O eq 'vos';
     my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
        $blksize,$blocks) = stat($Dfile);
     is($mode & 0777, 0640);
index 02506c7..718c81d 100644 (file)
@@ -15,6 +15,10 @@ if ( $^O eq "VMS" ) {
   skip_all( "Filename case may not be preserved and other porting issues." );
 }
 
+if ( $^O eq "vos" ) {
+  skip_all( "VOS combines the read and execute permission bits." );
+}
+
 plan('no_plan');
 
 use ExtUtils::Manifest qw(maniread);