Debian Codegraph @

test/filefuncs.awk

raw
1 @load "filefuncs"
2
3 BEGIN {
4 if (chdir(builddir) < 0) {
5 printf "Error: chdir failed with ERRNO %s\n", ERRNO
6 exit 1
7 }
8
9 if (stat(ARGV[0] "api.o", st) < 0) {
10 printf "Error: stat(%s) failed with ERRNO %s\n", ARGV[0] "api.o", ERRNO
11 exit 1
12 }
13
14 nf = split("name dev ino mode nlink uid gid size blocks atime mtime ctime pmode type", f)
15
16 for (i = 1; i <= nf; i++) {
17 if (!(f[i] in st)) {
18 printf "stat value for %s is missing\n",f[i]
19 rc = 1
20 }
21 else
22 delete st[f[i]]
23 }
24 exit rc+0
25 }