aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2013-03-11 22:50:11 +0200
committerArnold D. Robbins <arnold@skeeve.com>2013-03-11 22:50:11 +0200
commit891b30a5417f93c3fc5e5aa4d54e270282bea380 (patch)
tree149a8e67e1df432845988a04669f677a77392d25 /test
parent840661815d5063942b4475a908af423cf6bc813c (diff)
parenta7c502a756732ec9a1773d6169376bb7b25f4308 (diff)
downloadegawk-891b30a5417f93c3fc5e5aa4d54e270282bea380.tar.gz
egawk-891b30a5417f93c3fc5e5aa4d54e270282bea380.tar.bz2
egawk-891b30a5417f93c3fc5e5aa4d54e270282bea380.zip
Merge branch 'gawk-4.0-stable'
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog5
-rw-r--r--test/Makefile.am12
-rw-r--r--test/Makefile.in12
-rw-r--r--test/colonwarn.awk4
-rw-r--r--test/colonwarn.in1
-rw-r--r--test/colonwarn.ok3
6 files changed, 35 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 652480b2..031bbd1d 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2013-03-11 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (colonwarn): New test.
+ * colonwarn.awk, colonwarn.in, colonwarn.ok: New files.
+
2013-02-26 Arnold D. Robbins <arnold@skeeve.com>
* parseme.ok: Update after change in grammar. Now with new and
diff --git a/test/Makefile.am b/test/Makefile.am
index c45be575..1859932e 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -134,6 +134,9 @@ EXTRA_DIST = \
clsflnam.awk \
clsflnam.in \
clsflnam.ok \
+ colonwarn.awk \
+ colonwarn.in \
+ colonwarn.ok \
compare.awk \
compare.in \
compare.ok \
@@ -953,7 +956,7 @@ UNIX_TESTS = \
GAWK_EXT_TESTS = \
aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \
backw badargs beginfile1 beginfile2 binmode1 charasbytes \
- clos1way delsub devfd devfd1 devfd2 dumpvars exit \
+ colonwarn clos1way delsub devfd devfd1 devfd2 dumpvars exit \
fieldwdth fpat1 fpat2 fpat3 fpatnull fsfwfs funlen \
functab1 functab2 functab3 \
fwtest fwtest2 fwtest3 \
@@ -1787,6 +1790,13 @@ reginttrad:
@$(AWK) --traditional -r -f $(srcdir)/$@.awk > _$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+colonwarn:
+ @echo $@
+ @for i in 1 2 3 ; \
+ do $(AWK) -f $(srcdir)/$@.awk $$i < $(srcdir)/$@.in ; \
+ done > _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
# Targets generated for other tests:
include Maketests
diff --git a/test/Makefile.in b/test/Makefile.in
index e1a44a5a..f320a720 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -346,6 +346,9 @@ EXTRA_DIST = \
clsflnam.awk \
clsflnam.in \
clsflnam.ok \
+ colonwarn.awk \
+ colonwarn.in \
+ colonwarn.ok \
compare.awk \
compare.in \
compare.ok \
@@ -1164,7 +1167,7 @@ UNIX_TESTS = \
GAWK_EXT_TESTS = \
aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \
backw badargs beginfile1 beginfile2 binmode1 charasbytes \
- clos1way delsub devfd devfd1 devfd2 dumpvars exit \
+ colonwarn clos1way delsub devfd devfd1 devfd2 dumpvars exit \
fieldwdth fpat1 fpat2 fpat3 fpatnull fsfwfs funlen \
functab1 functab2 functab3 \
fwtest fwtest2 fwtest3 \
@@ -2165,6 +2168,13 @@ reginttrad:
@echo $@
@$(AWK) --traditional -r -f $(srcdir)/$@.awk > _$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
+colonwarn:
+ @echo $@
+ @for i in 1 2 3 ; \
+ do $(AWK) -f $(srcdir)/$@.awk $$i < $(srcdir)/$@.in ; \
+ done > _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
Gt-dummy:
# file Maketests, generated from Makefile.am by the Gentests program
addcomma:
diff --git a/test/colonwarn.awk b/test/colonwarn.awk
new file mode 100644
index 00000000..0b0650e0
--- /dev/null
+++ b/test/colonwarn.awk
@@ -0,0 +1,4 @@
+BEGIN { pattern = ARGV[1] + 0; delete ARGV }
+pattern == 1 { sub(/[][:space:]]/,""); print }
+pattern == 2 { sub(/[\][:space:]]/,""); print }
+pattern == 3 { sub(/[^][:space:]]/,""); print }
diff --git a/test/colonwarn.in b/test/colonwarn.in
new file mode 100644
index 00000000..d34368d7
--- /dev/null
+++ b/test/colonwarn.in
@@ -0,0 +1 @@
+a]b
diff --git a/test/colonwarn.ok b/test/colonwarn.ok
new file mode 100644
index 00000000..d084ee3d
--- /dev/null
+++ b/test/colonwarn.ok
@@ -0,0 +1,3 @@
+ab
+ab
+]b