aboutsummaryrefslogtreecommitdiffstats
path: root/test/lintexp.awk
diff options
context:
space:
mode:
Diffstat (limited to 'test/lintexp.awk')
-rw-r--r--test/lintexp.awk9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/lintexp.awk b/test/lintexp.awk
new file mode 100644
index 00000000..082d7447
--- /dev/null
+++ b/test/lintexp.awk
@@ -0,0 +1,9 @@
+BEGIN {
+ split("0|0a", f, "|")
+ z = exp(f[1]) # no warning, since strnum converted to number
+ x = f[2]+0 # trigger NUMCUR
+ z = exp(f[2]) # should print a warning
+ x = "0"
+ y = x+0 # trigger NUMCUR
+ z = exp(x) # should print a warning, since x is still a string!
+}