else
{print "not ok 5\n";}
-`/bin/rm -f Io.argv.tmp`;
+`/bin/rm -f Io.argv.tmp` if -x '/bin/rm';
`rm -f tmp 2>/dev/null; mkdir tmp 2>/dev/null`;
chdir './tmp';
-`/bin/rm -rf a b c x`;
+`/bin/rm -rf a b c x` if -x '/bin/rm';
umask(022);
open(fh,'>a') || die "Can't create a";
close(fh);
-if (link('a','b')) {print "ok 2\n";} else {print "not ok 2\n";}
+if (eval {link('a','b')}) {print "ok 2\n";} else {print "not ok 2\n";}
-if (link('b','c')) {print "ok 3\n";} else {print "not ok 3\n";}
+if (eval {link('b','c')}) {print "ok 3\n";} else {print "not ok 3\n";}
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks) = stat('c');
print +($x = unpack("%32B*", "Now is the time for all good blurfl")) == 129
? "ok 7\n" : "not ok 7 $x\n";
-open(BIN, "./perl") || die "Can't open ../perl: $!\n";
+open(BIN, "./perl") || open(BIN, "./perl.exe")
+ || die "Can't open ../perl or ../perl.exe: $!\n";
sysread BIN, $foo, 8192;
close BIN;
$cnt = $uid = 0;
die "Can't run op/stat.t test 35 without pwd working" unless $cwd;
+print ("not ok 35\n"), goto tty_test unless -d '/usr/bin';
chdir '/usr/bin' || die "Can't cd to /usr/bin";
while (defined($_ = <*>)) {
$cnt++;
if ($uid > 0 && $uid < $cnt)
{print "ok 35\n";}
else
- {print "not ok 35 ($uid $cnt)\n";}
+ {print "not ok 35 \n# ($uid $cnt)\n";}
+
+tty_test:
unless (open(tty,"/dev/tty")) {
print STDERR "Can't open /dev/tty--run t/TEST outside of make.\n";
if (-T 'op/stat.t') {print "ok 41\n";} else {print "not ok 41\n";}
if (! -B 'op/stat.t') {print "ok 42\n";} else {print "not ok 42\n";}
-if (-B './perl') {print "ok 43\n";} else {print "not ok 43\n";}
-if (! -T './perl') {print "ok 44\n";} else {print "not ok 44\n";}
+if (-B './perl' || -B './perl.exe') {print "ok 43\n";} else {print "not ok 43\n";}
+if (! -T './perl' && ! -T './perl.exe') {print "ok 44\n";} else {print "not ok 44\n";}
open(FOO,'op/stat.t');
eval { -T FOO; };