aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog5
-rw-r--r--test/Makefile.am6
-rw-r--r--test/Makefile.in11
-rw-r--r--test/Maketests5
-rw-r--r--test/lintplus.awk1
-rw-r--r--test/lintplus.ok2
6 files changed, 26 insertions, 4 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 45c65052..097f19bd 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2020-05-06 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (EXTRA_DIST): New test, lintplus.
+ * lintplus.awk, lintplus.ok: New files.
+
2020-04-14 Arnold D. Robbins <arnold@skeeve.com>
* 5.1.0: Release tar ball made.
diff --git a/test/Makefile.am b/test/Makefile.am
index c2ad113c..55b1ff34 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -625,6 +625,8 @@ EXTRA_DIST = \
lintold.awk \
lintold.in \
lintold.ok \
+ lintplus.awk \
+ lintplus.ok \
lintset.awk \
lintset.ok \
lintwarn.awk \
@@ -1396,7 +1398,7 @@ GAWK_EXT_TESTS = \
icasefs icasers id igncdym igncfs ignrcas2 ignrcas4 ignrcase incdupe \
incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 include include2 \
indirectbuiltin indirectcall indirectcall2 intarray isarrayunset \
- lint lintexp lintindex lintint lintlength lintold lintset lintwarn \
+ lint lintexp lintindex lintint lintlength lintplus lintold lintset lintwarn \
manyfiles match1 match2 match3 mbstr1 mbstr2 mixed1 mktime muldimposix \
nastyparm negtime next nondec nondec2 nonfatal1 nonfatal2 nonfatal3 \
nsawk1a nsawk1b nsawk1c nsawk2a nsawk2b \
@@ -1446,7 +1448,7 @@ NEED_DEBUG = dbugtypedre1 dbugtypedre2 dbugeval2 dbugeval3 symtab10
# List of the tests which should be run with --lint option:
NEED_LINT = \
- defref fmtspcl lintexp lintindex lintint lintlength lintwarn \
+ defref fmtspcl lintexp lintindex lintint lintlength lintplus lintwarn \
noeffect nofmtch nonl shadow uninit2 uninit3 uninit4 uninit5 uninitialized
# List of the tests which should be run with --lint-old option:
diff --git a/test/Makefile.in b/test/Makefile.in
index 67051084..f5f8e05a 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -886,6 +886,8 @@ EXTRA_DIST = \
lintold.awk \
lintold.in \
lintold.ok \
+ lintplus.awk \
+ lintplus.ok \
lintset.awk \
lintset.ok \
lintwarn.awk \
@@ -1657,7 +1659,7 @@ GAWK_EXT_TESTS = \
icasefs icasers id igncdym igncfs ignrcas2 ignrcas4 ignrcase incdupe \
incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 include include2 \
indirectbuiltin indirectcall indirectcall2 intarray isarrayunset \
- lint lintexp lintindex lintint lintlength lintold lintset lintwarn \
+ lint lintexp lintindex lintint lintlength lintplus lintold lintset lintwarn \
manyfiles match1 match2 match3 mbstr1 mbstr2 mixed1 mktime muldimposix \
nastyparm negtime next nondec nondec2 nonfatal1 nonfatal2 nonfatal3 \
nsawk1a nsawk1b nsawk1c nsawk2a nsawk2b \
@@ -1704,7 +1706,7 @@ NEED_DEBUG = dbugtypedre1 dbugtypedre2 dbugeval2 dbugeval3 symtab10
# List of the tests which should be run with --lint option:
NEED_LINT = \
- defref fmtspcl lintexp lintindex lintint lintlength lintwarn \
+ defref fmtspcl lintexp lintindex lintint lintlength lintplus lintwarn \
noeffect nofmtch nonl shadow uninit2 uninit3 uninit4 uninit5 uninitialized
@@ -4503,6 +4505,11 @@ lintlength:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+lintplus:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
lintold:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint-old < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index 6982870d..4bee1ddc 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -1637,6 +1637,11 @@ lintlength:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+lintplus:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
lintold:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint-old < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/lintplus.awk b/test/lintplus.awk
new file mode 100644
index 00000000..3c4e76c4
--- /dev/null
+++ b/test/lintplus.awk
@@ -0,0 +1 @@
+BEGIN { y = substr("abc", 2, 2) + "d" ; print y }
diff --git a/test/lintplus.ok b/test/lintplus.ok
new file mode 100644
index 00000000..e03a19ea
--- /dev/null
+++ b/test/lintplus.ok
@@ -0,0 +1,2 @@
+gawk: lintplus.awk:1: warning: operator `+' used on two string values
+0