home *** CD-ROM | disk | FTP | other *** search
- print "1..4\n";
-
- #
- # check that $^T has correct initial value
- #
-
- if ($^T == time) {print "ok 1\n";} else {print "not ok 1\n";};
-
- #
- # make a temporary file
- #
-
- open (T, ">foo$$.tmp") || die "can't open foo$$.tmp: $!\n";
- close T;
-
- #
- # check to insure that creation date is negative from program start
- # (measured in days since program start)
- #
- sleep(3);
-
- if (-M "foo$$.tmp" < 0) {print "ok 2\n";} else {print "not ok 2\n";};
-
- #
- # now check that -C and -A are the same as -M
- #
-
- $m = -M "foo$$.tmp";
- $a = -A "foo$$.tmp";
- $c = -C "foo$$.tmp";
- #print "m: $m, a: $a, c: $c\n";
-
- if ($c == $m && $a == $m) {print "ok 3\n";} else {print "not ok 3\n";}
-
- #
- # reopen the file and see if the testing the file handle works
- #
-
- open (T, "foo$$.tmp") || die "Can't open foo$$.tmp for reading: $!\n";
- $m1 = -M T;
- $a1 = -A T;
- $c1 = -C T;
- close T;
-
- if ($m == $m1) {print "ok 4\n";} else {print "not ok 4\n";}
-
- #print "m1: $m1, a1: $a1, c1: $c1\n";
-
- unlink "foo$$.tmp";
-
-