diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2019-01-25 11:47:18 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2019-01-25 11:47:18 +0200 |
commit | eceb548b02f0d72ca6a6e9a68bfd615ac9549a64 (patch) | |
tree | 10d127076e7f850560095dd386c9f28b2c4811aa /test/nsfuncrecurse.awk | |
parent | 378de9aa9e73d44d0172947c38be67c0bd78a0b0 (diff) | |
download | gawk-eceb548b02f0d72ca6a6e9a68bfd615ac9549a64.tar.gz |
Rework namespace handling to make simpler and correct. Add two test cases.
Diffstat (limited to 'test/nsfuncrecurse.awk')
-rw-r--r-- | test/nsfuncrecurse.awk | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/nsfuncrecurse.awk b/test/nsfuncrecurse.awk new file mode 100644 index 00000000..1a006ceb --- /dev/null +++ b/test/nsfuncrecurse.awk @@ -0,0 +1,18 @@ +@namespace "foo" + +function test(v) +{ + if (v <= 0) + return + + Level++ + v-- + printf("Level = %d, v = %d\n", Level, v) + test(v) + Level-- +} + +BEGIN { + Level = 0 + test(5) +} |