diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2014-09-10 08:18:21 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2014-09-10 08:18:21 +0300 |
commit | 6de0102373304c0fdf70a7ddeb17dd1caa3a9b23 (patch) | |
tree | 7a8f3f18180e0b84893a4cccd883c80ffb7d9bc0 /test/functab4.awk | |
parent | d7c8dfd41bd5671ddfa6c81b2ef1779cab06e56b (diff) | |
parent | ca9f23d6c33c4b5cb3786d480948a42988ca99ac (diff) | |
download | egawk-6de0102373304c0fdf70a7ddeb17dd1caa3a9b23.tar.gz egawk-6de0102373304c0fdf70a7ddeb17dd1caa3a9b23.tar.bz2 egawk-6de0102373304c0fdf70a7ddeb17dd1caa3a9b23.zip |
Merge branch 'master' into comment
Diffstat (limited to 'test/functab4.awk')
-rw-r--r-- | test/functab4.awk | 26 |
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") } |