aboutsummaryrefslogtreecommitdiffstats
path: root/test/lintindex.awk
diff options
context:
space:
mode:
Diffstat (limited to 'test/lintindex.awk')
-rw-r--r--test/lintindex.awk10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/lintindex.awk b/test/lintindex.awk
new file mode 100644
index 00000000..8e6d7e56
--- /dev/null
+++ b/test/lintindex.awk
@@ -0,0 +1,10 @@
+BEGIN {
+ x = 537
+ y = 3
+ z = index(x, y) # should print lint warning
+ # now that STRCUR has been trigged on x and y, check that we still
+ # get the warning
+ z = index(x, y) # should print lint warning
+ if (z != 2)
+ print "oops"
+}