diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2020-01-24 09:36:43 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2020-01-24 09:36:43 +0200 |
commit | c0dfb9269380ff5a90dbf6606f64989848304527 (patch) | |
tree | 2d21a4e0bc3d75b8a98cc6b0b3db8e7fafd90dbd /test/symtab11.awk | |
parent | 1ef484e65a03a8360434c404c9a3006671bab2f7 (diff) | |
download | egawk-c0dfb9269380ff5a90dbf6606f64989848304527.tar.gz egawk-c0dfb9269380ff5a90dbf6606f64989848304527.tar.bz2 egawk-c0dfb9269380ff5a90dbf6606f64989848304527.zip |
Fix assertion error in sorted loops for SYMTAB/FUNCTAB.
Diffstat (limited to 'test/symtab11.awk')
-rw-r--r-- | test/symtab11.awk | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/symtab11.awk b/test/symtab11.awk new file mode 100644 index 00000000..ec7f096b --- /dev/null +++ b/test/symtab11.awk @@ -0,0 +1,30 @@ +BEGIN { + PROCINFO["sorted_in"] = "@val_type_asc" # okay with PROCINFO commented out, kaboom if not + IGNORECASE = 1 # yes + + printf("BEGIN -- Symtab is next\n") > "/dev/stdout" + for (i in SYMTAB) { + printf "[%s]\n", i # else {printf("[%s]\t(%s)\n",i,SYMTAB[i]);} + } + printf("BEGIN-- after Symtab loop\n") > "/dev/stdout" # never got here + + printf("BEGIN -- Functab is next\n") > "/dev/stdout" + for (i in FUNCTAB) { + printf "[%s]\n", i # else {printf("[%s]\t(%s)\n",i,FUNCTAB[i]);} + } + printf("BEGIN-- after Functab loop\n") > "/dev/stdout" # never got here + exit +} + +function foo() +{ + print "foo called" +} + +function bar() +{ + print "bar called" +} + +# e-o-begin +# --- No END, No Main ... --- |