aboutsummaryrefslogtreecommitdiffstats
path: root/test/stupid1.awk
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2020-01-08 20:53:54 +0200
committerArnold D. Robbins <arnold@skeeve.com>2020-01-08 20:53:54 +0200
commitebe9dd1633c6f5e5d42e922a70f72829c14c193c (patch)
treefeb83b935704aaecb189657213b6e98b8f6ee709 /test/stupid1.awk
parent660a55b365e4ee22f3f0efe69c887e2fd1f71303 (diff)
downloadegawk-ebe9dd1633c6f5e5d42e922a70f72829c14c193c.tar.gz
egawk-ebe9dd1633c6f5e5d42e922a70f72829c14c193c.tar.bz2
egawk-ebe9dd1633c6f5e5d42e922a70f72829c14c193c.zip
Fix a bug in retrieving unset variables through SYMTAB.
Diffstat (limited to 'test/stupid1.awk')
-rw-r--r--test/stupid1.awk13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/stupid1.awk b/test/stupid1.awk
new file mode 100644
index 00000000..9881ac6a
--- /dev/null
+++ b/test/stupid1.awk
@@ -0,0 +1,13 @@
+BEGIN {
+ abc("varname")
+ varname
+}
+
+func abc(n)
+{
+ if (n in SYMTAB) {
+ print "before"
+ is = SYMTAB[n]
+ print "after"
+ }
+}