make testsuite reflect change#3157 (Math::BigFloat->new now
[p5sagit/p5-mst-13.2.git] / t / lib / posix.t
index d63e695..4c6aa49 100755 (executable)
@@ -2,7 +2,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    @INC = '../lib';
+    unshift @INC, '../lib';
     require Config; import Config;
     if ($^O ne 'VMS' and $Config{'extensions'} !~ /\bPOSIX\b/) {
        print "1..0\n";
@@ -16,6 +16,8 @@ use strict subs;
 $| = 1;
 print "1..18\n";
 
+$Is_W32 = $^O eq 'MSWin32';
+
 $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";
@@ -31,6 +33,12 @@ close $writer;
 print <$reader>;
 close $reader;
 
+if ($Is_W32) {
+    for (6..11) {
+       print "ok $_ # skipped, no sigaction support on win32\n";
+    }
+}
+else {
 $sigset = new POSIX::SigSet 1,3;
 delset $sigset 1;
 if (!ismember $sigset 1) { print "ok 6\n" }
@@ -53,6 +61,7 @@ sub SigHUP {
 sub SigINT {
     print "ok 10\n";
 }
+}
 
 print &_POSIX_OPEN_MAX > $fds[1] ? "ok 12\n" : "not ok 12\n";
 
@@ -87,5 +96,6 @@ print &POSIX::acos(1.0) == 0.0 ? "ok 17\n" : "not ok 17\n";
 print POSIX::strftime("ok 18 # %H:%M, on %D\n", localtime());
 
 $| = 0;
-print '@#!*$@(!@#$';
+# The following line assumes buffered output, which may be not true with EMX:
+print '@#!*$@(!@#$' unless ($^O eq 'os2' || $^O eq 'uwin' || $^O eq 'os390');
 _exit(0);