From f6dacdcaaefb1af7d8b6d7da1b87001a562f1902 Mon Sep 17 00:00:00 2001 From: Paul Green Date: Thu, 10 Nov 2011 17:34:19 -0500 Subject: [PATCH] Update several test cases to not generate failures on VOS. --- cpan/Time-Piece/t/02core.t | 3 ++- ext/Socket/t/Socket.t | 7 ++++++- lib/File/Compare.t | 1 + lib/File/Copy.t | 2 ++ t/lib/dbmt_common.pl | 2 +- t/porting/exec-bit.t | 4 ++++ 6 files changed, 16 insertions(+), 3 deletions(-) diff --git a/cpan/Time-Piece/t/02core.t b/cpan/Time-Piece/t/02core.t index 8a0673e..1e8d264 100644 --- a/cpan/Time-Piece/t/02core.t +++ b/cpan/Time-Piece/t/02core.t @@ -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 } diff --git a/ext/Socket/t/Socket.t b/ext/Socket/t/Socket.t index d289f10..326fa7a 100644 --- a/ext/Socket/t/Socket.t +++ b/ext/Socket/t/Socket.t @@ -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; diff --git a/lib/File/Compare.t b/lib/File/Compare.t index 7a31af6..1b7d038 100644 --- a/lib/File/Compare.t +++ b/lib/File/Compare.t @@ -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 { diff --git a/lib/File/Copy.t b/lib/File/Copy.t index 63c99d1..ffd3d59 100644 --- a/lib/File/Copy.t +++ b/lib/File/Copy.t @@ -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 __ ($) { diff --git a/t/lib/dbmt_common.pl b/t/lib/dbmt_common.pl index b7d8c2e..5d4098c 100644 --- a/t/lib/dbmt_common.pl +++ b/t/lib/dbmt_common.pl @@ -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); diff --git a/t/porting/exec-bit.t b/t/porting/exec-bit.t index 02506c7..718c81d 100644 --- a/t/porting/exec-bit.t +++ b/t/porting/exec-bit.t @@ -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); -- 2.7.4