aboutsummaryrefslogtreecommitdiffstats
path: root/test/symtab11.awk
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2020-01-24 09:36:43 +0200
committerArnold D. Robbins <arnold@skeeve.com>2020-01-24 09:36:43 +0200
commitc0dfb9269380ff5a90dbf6606f64989848304527 (patch)
tree2d21a4e0bc3d75b8a98cc6b0b3db8e7fafd90dbd /test/symtab11.awk
parent1ef484e65a03a8360434c404c9a3006671bab2f7 (diff)
downloadegawk-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.awk30
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 ... ---