10 eval { my @n = stat "TEST" };
11 $hasst = 1 unless $@ && $@ =~ /unimplemented/;
12 unless ($hasst) { print "1..0 # Skip: no stat\n"; exit 0 }
14 $hasst = 0 unless $Config{'i_sysstat'} eq 'define';
15 unless ($hasst) { print "1..0 # Skip: no sys/stat.h\n"; exit 0 }
19 our @stat = stat "TEST"; # This is the function stat.
20 unless (@stat) { print "1..0 # Skip: no file TEST\n"; exit 0 }
29 my $stat = stat "TEST"; # This is the OO stat.
31 print "not " unless $stat->dev == $stat[ 0];
34 print "not " unless $stat->ino == $stat[ 1];
37 print "not " unless $stat->mode == $stat[ 2];
40 print "not " unless $stat->nlink == $stat[ 3];
43 print "not " unless $stat->uid == $stat[ 4];
46 print "not " unless $stat->gid == $stat[ 5];
49 print "not " unless $stat->rdev == $stat[ 6];
52 print "not " unless $stat->size == $stat[ 7];
55 print "not " unless $stat->atime == $stat[ 8];
58 print "not " unless $stat->mtime == $stat[ 9];
61 print "not " unless $stat->ctime == $stat[10];
64 print "not " unless $stat->blksize == $stat[11];
67 print "not " unless $stat->blocks == $stat[12];
70 # Testing pretty much anything else is unportable.