aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog3
-rw-r--r--test/Makefile.am6
-rw-r--r--test/Makefile.in11
-rw-r--r--test/Maketests5
-rw-r--r--test/fpat3.awk10
-rw-r--r--test/fpat3.in1
-rw-r--r--test/fpat3.ok4
7 files changed, 37 insertions, 3 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 334f1961..8c165b04 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,7 +1,8 @@
2011-08-10 Arnold D. Robbins <arnold@skeeve.com>
- * Makefile.am (beginfile2, fwtest3): New tests.
+ * Makefile.am (beginfile2, fpat3, fwtest3): New tests.
* beginfile2.awk, beginfile2.in, beginfile2.ok: New files.
+ * fpat3.awk, fpat3.in, fpat3.ok: New files.
* fwtest3.awk, fwtest3.in, fwtest3.ok: New files.
2011-08-09 Arnold D. Robbins <arnold@skeeve.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index a7789953..3d259afe 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -234,6 +234,9 @@ EXTRA_DIST = \
fpat1.ok \
fpat2.awk \
fpat2.ok \
+ fpat3.awk \
+ fpat3.in \
+ fpat3.ok \
fpatnull.awk \
fpatnull.in \
fpatnull.ok \
@@ -811,7 +814,8 @@ GAWK_EXT_TESTS = \
aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \
backw badargs beginfile1 beginfile2 \
binmode1 clos1way delsub devfd devfd1 \
- devfd2 dumpvars exit fieldwdth fpat1 fpat2 fpatnull fsfwfs funlen \
+ devfd2 dumpvars exit fieldwdth fpat1 fpat2 fpat3 \
+ fpatnull fsfwfs funlen \
fwtest fwtest2 fwtest3 \
gensub gensub2 getlndir gnuops2 gnuops3 gnureops \
icasefs icasers igncdym igncfs ignrcas2 ignrcase indirectcall lint \
diff --git a/test/Makefile.in b/test/Makefile.in
index 1f1f5820..3dd318f9 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -419,6 +419,9 @@ EXTRA_DIST = \
fpat1.ok \
fpat2.awk \
fpat2.ok \
+ fpat3.awk \
+ fpat3.in \
+ fpat3.ok \
fpatnull.awk \
fpatnull.in \
fpatnull.ok \
@@ -996,7 +999,8 @@ GAWK_EXT_TESTS = \
aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \
backw badargs beginfile1 beginfile2 \
binmode1 clos1way delsub devfd devfd1 \
- devfd2 dumpvars exit fieldwdth fpat1 fpat2 fpatnull fsfwfs funlen \
+ devfd2 dumpvars exit fieldwdth fpat1 fpat2 fpat3 \
+ fpatnull fsfwfs funlen \
fwtest fwtest2 fwtest3 \
gensub gensub2 getlndir gnuops2 gnuops3 gnureops \
icasefs icasers igncdym igncfs ignrcas2 ignrcase indirectcall lint \
@@ -2689,6 +2693,11 @@ fpat2:
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+fpat3:
+ @echo fpat3
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
fpatnull:
@echo fpatnull
@AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index cfbfc79e..c76769f4 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -930,6 +930,11 @@ fpat2:
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+fpat3:
+ @echo fpat3
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
fpatnull:
@echo fpatnull
@AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/fpat3.awk b/test/fpat3.awk
new file mode 100644
index 00000000..801bb58e
--- /dev/null
+++ b/test/fpat3.awk
@@ -0,0 +1,10 @@
+BEGIN {
+ FPAT = "[^,]*"
+
+}
+
+{
+ if (x) NF
+ for (i = 1; i <= 4; ++i)
+ print i, $i
+}
diff --git a/test/fpat3.in b/test/fpat3.in
new file mode 100644
index 00000000..28416a42
--- /dev/null
+++ b/test/fpat3.in
@@ -0,0 +1 @@
+a,b,,c
diff --git a/test/fpat3.ok b/test/fpat3.ok
new file mode 100644
index 00000000..543bb429
--- /dev/null
+++ b/test/fpat3.ok
@@ -0,0 +1,4 @@
+1 a
+2 b
+3
+4 c