summaryrefslogtreecommitdiff
path: root/t/op/stat.t
diff options
context:
space:
mode:
authorTim Bunce <Tim.Bunce@ig.co.uk>1997-06-11 12:00:00 +1200
committerTim Bunce <Tim.Bunce@ig.co.uk>1997-06-11 12:00:00 +1200
commit3e3baf6d63945cb64e829d6e5c70a7d00f3d3d03 (patch)
tree0143be655536dc428f4fa3cc7d01f6bcffe14c01 /t/op/stat.t
parent08aa1457cd52a368c210ab76a3da91cfadabea1a (diff)
parent3458556dd685b1767b760a72bd2e9007b5c4575e (diff)
downloadperl-3e3baf6d63945cb64e829d6e5c70a7d00f3d3d03.tar.gz
[differences between cumulative patch application and perl5.004_01]perl-5.004_01
[editor's note: The changes between this and 5.004 were processed from the m1t2 release, which was a bad idea as it was the _01 release which had the final corrected attributions. The differences between the various m*t* releases do that; I considered it most valuable just to look at the _NN releases. Many patches have been separated out and/or applied from the p5p archives nonetheless.]
Diffstat (limited to 't/op/stat.t')
-rwxr-xr-xt/op/stat.t39
1 files changed, 26 insertions, 13 deletions
diff --git a/t/op/stat.t b/t/op/stat.t
index c1cc1573b4..aea5cc147c 100755
--- a/t/op/stat.t
+++ b/t/op/stat.t
@@ -74,7 +74,9 @@ if (!$> || ! -r 'Op.stat.tmp') {print "ok 9\n";} else {print "not ok 9\n";}
if (!$> || ! -w 'Op.stat.tmp') {print "ok 10\n";} else {print "not ok 10\n";}
eval '$> = $olduid;'; # switch uid back (may not be implemented)
print "# olduid=$olduid, newuid=$>\n" unless ($> == $olduid);
-if (! -x 'Op.stat.tmp') {print "ok 11\n";} else {print "not ok 11\n";}
+
+if ($Is_MSWin32 or ! -x 'Op.stat.tmp') {print "ok 11\n";}
+else {print "not ok 11\n";}
foreach ((12,13,14,15,16,17)) {
print "ok $_\n"; #deleted tests
@@ -158,24 +160,35 @@ else
tty_test:
-if ($Is_MSWin32) {
- print "ok 36\n";
- print "ok 37\n";
+# To assist in automated testing when a controlling terminal (/dev/tty)
+# may not be available (at, cron rsh etc), the PERL_SKIP_TTY_TEST env var
+# can be set to skip the tests that need a tty.
+unless($ENV{PERL_SKIP_TTY_TEST}) {
+ if ($Is_MSWin32) {
+ print "ok 36\n";
+ print "ok 37\n";
+ }
+ else {
+ unless (open(tty,"/dev/tty")) {
+ print STDERR "Can't open /dev/tty--run t/TEST outside of make.\n";
+ }
+ if (-t tty) {print "ok 36\n";} else {print "not ok 36\n";}
+ if (-c tty) {print "ok 37\n";} else {print "not ok 37\n";}
+ close(tty);
+ }
+ if (! -t tty) {print "ok 38\n";} else {print "not ok 38\n";}
+ if (-t) {print "ok 39\n";} else {print "not ok 39\n";}
}
else {
- unless (open(tty,"/dev/tty")) {
- print STDERR "Can't open /dev/tty--run t/TEST outside of make.\n";
- }
- if (-t tty) {print "ok 36\n";} else {print "not ok 36\n";}
- if (-c tty) {print "ok 37\n";} else {print "not ok 37\n";}
- close(tty);
+ print "ok 36\n";
+ print "ok 37\n";
+ print "ok 38\n";
+ print "ok 39\n";
}
-if (! -t tty) {print "ok 38\n";} else {print "not ok 38\n";}
open(null,"/dev/null");
if (! -t null || -e '/xenix' || $^O eq 'machten' || $Is_MSWin32)
- {print "ok 39\n";} else {print "not ok 39\n";}
+ {print "ok 40\n";} else {print "not ok 40\n";}
close(null);
-if (-t) {print "ok 40\n";} else {print "not ok 40\n";}
# These aren't strictly "stat" calls, but so what?