aboutsummaryrefslogtreecommitdiffstats
path: root/test/functab4.awk
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2014-09-05 08:35:55 +0300
committerArnold D. Robbins <arnold@skeeve.com>2014-09-05 08:35:55 +0300
commit3f30f514c6e81c4a9e8ba1374a5080683783c382 (patch)
tree4fc6025ac905328293838b2a7b7d414f64bb44bc /test/functab4.awk
parent7448f28d356fc5cd8d9117111baea3a549e0930e (diff)
parentc30a04c8d3a2eef06338934f577fe3416f40d529 (diff)
downloadegawk-3f30f514c6e81c4a9e8ba1374a5080683783c382.tar.gz
egawk-3f30f514c6e81c4a9e8ba1374a5080683783c382.tar.bz2
egawk-3f30f514c6e81c4a9e8ba1374a5080683783c382.zip
Merge branch 'gawk-4.1-stable'
Diffstat (limited to 'test/functab4.awk')
-rw-r--r--test/functab4.awk26
1 files changed, 21 insertions, 5 deletions
diff --git a/test/functab4.awk b/test/functab4.awk
index 0d9d4267..196fcc6d 100644
--- a/test/functab4.awk
+++ b/test/functab4.awk
@@ -6,9 +6,25 @@ function foo()
}
BEGIN {
- x = FUNCTAB["chdir"]
- print "x =", x
- @x("/tmp")
- printf "we are now in --> "
- system("/bin/pwd || /usr/bin/pwd")
+ f = FUNCTAB["foo"]
+ @f()
+
+ ret1 = stat(".", data1)
+ print "ret1 =", ret1
+
+ f = "stat"
+ ret2 = @f(".", data2)
+ print "ret2 =", ret2
+
+ problem = 0
+ for (i in data1) {
+ if (! isarray(data1[i])) {
+# print i, data1[i]
+ if (! (i in data2) || data1[i] != data2[i]) {
+ printf("mismatch element \"%s\"\n", i)
+ problems++
+ }
+ }
+ }
+ print(problems ? (problems+0) "encountered" : "no problems encountered")
}