aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog18
-rw-r--r--test/Makefile.am19
-rw-r--r--test/Makefile.in23
-rw-r--r--test/Maketests2
-rw-r--r--test/fwtest3.awk7
-rw-r--r--test/fwtest3.ok13
-rw-r--r--test/fwtest4.awk1
-rw-r--r--test/fwtest4.in (renamed from test/fwtest3.in)0
-rw-r--r--test/fwtest4.ok1
9 files changed, 73 insertions, 11 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index df0ed8fa..d684e73a 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,14 @@
+2017-03-27 Arnold D. Robbins <arnold@skeeve.com>
+
+ * fwtest4: Renamed from fwtest3.
+ * fwtest3: Renamed from fwtest2b.
+ * Makefile.am: Updated.
+
+2017-03-21 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * Makefile.am (fwtest2b): Add new test of enhanced FIELDWIDTHS syntax.
+ * fwtest2b.awk, fwtest2b.ok: New files.
+
2017-03-19 Andrew J. Schorr <aschorr@telemetry-investments.com>
* Makefile.am (argarray): Always copy argarray.in to the local
@@ -5,6 +16,13 @@
$(srcdir) is the current directory.
* argarray.ok: Replace argarray.in with argarray.input.
+2017-03-06 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * Makefile.am (readdir_test): New test to check whether get_record
+ field_width parsing is working by comparing the results from the
+ readdir and readdir_test extensions.
+ (SHLIB_TESTS): Add readdir_test.
+
2017-02-21 Andrew J. Schorr <aschorr@telemetry-investments.com>
* Makefile.am (mktime): New test.
diff --git a/test/Makefile.am b/test/Makefile.am
index a356d63b..b1a97621 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -386,8 +386,10 @@ EXTRA_DIST = \
fwtest2.in \
fwtest2.ok \
fwtest3.awk \
- fwtest3.in \
fwtest3.ok \
+ fwtest4.awk \
+ fwtest4.in \
+ fwtest4.ok \
genpot.awk \
genpot.ok \
gensub.awk \
@@ -1221,7 +1223,7 @@ GAWK_EXT_TESTS = \
crlf dbugeval dbugeval2 dbugtypedre1 dbugtypedre2 delsub \
devfd devfd1 devfd2 dumpvars errno exit \
fieldwdth forcenum fpat1 fpat2 fpat3 fpat4 fpat5 fpatnull fsfwfs funlen \
- functab1 functab2 functab3 fwtest fwtest2 fwtest3 \
+ functab1 functab2 functab3 fwtest fwtest2 fwtest3 fwtest4 \
genpot gensub gensub2 gensub3 getlndir gnuops2 gnuops3 gnureops gsubind \
icasefs icasers id igncdym igncfs ignrcas2 ignrcas4 ignrcase \
incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \
@@ -1263,7 +1265,7 @@ LOCALE_CHARSET_TESTS = \
SHLIB_TESTS = \
apiterm fnmatch filefuncs fork fork2 fts functab4 getfile inplace1 inplace2 inplace3 \
- ordchr ordchr2 readdir readfile readfile2 revout revtwoway rwarray testext time
+ ordchr ordchr2 readdir readdir_test readfile readfile2 revout revtwoway rwarray testext time
# List of the tests which should be run with --lint option:
NEED_LINT = \
@@ -2187,6 +2189,12 @@ readdir:
-v dirlist=_dirlist -v longlist=_longlist > $@.ok
@-$(CMP) $@.ok _$@ && rm -f $@.ok _$@ _dirlist _longlist
+readdir_test:
+ @echo $@
+ @$(AWK) -lreaddir -F/ '{printf "[%s] [%s] [%s] [%s]\n", $$1, $$2, $$3, $$4}' "$(top_srcdir)" > $@.ok
+ @$(AWK) -lreaddir_test '{printf "[%s] [%s] [%s] [%s]\n", $$1, $$2, $$3, $$4}' "$(top_srcdir)" > _$@
+ @-$(CMP) $@.ok _$@ && rm -f $@.ok _$@
+
fts:
@case `uname` in \
IRIX) \
@@ -2367,6 +2375,11 @@ arrdbg:
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ "$(srcdir)"/$@.ok
# @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ "$(srcdir)"/$@.ok || exit 0
+fwtest3:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/fwtest2.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
# Targets generated for other tests:
include Maketests
diff --git a/test/Makefile.in b/test/Makefile.in
index 8719840b..57f5bf61 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -644,8 +644,10 @@ EXTRA_DIST = \
fwtest2.in \
fwtest2.ok \
fwtest3.awk \
- fwtest3.in \
fwtest3.ok \
+ fwtest4.awk \
+ fwtest4.in \
+ fwtest4.ok \
genpot.awk \
genpot.ok \
gensub.awk \
@@ -1478,7 +1480,7 @@ GAWK_EXT_TESTS = \
crlf dbugeval dbugeval2 dbugtypedre1 dbugtypedre2 delsub \
devfd devfd1 devfd2 dumpvars errno exit \
fieldwdth forcenum fpat1 fpat2 fpat3 fpat4 fpat5 fpatnull fsfwfs funlen \
- functab1 functab2 functab3 fwtest fwtest2 fwtest3 \
+ functab1 functab2 functab3 fwtest fwtest2 fwtest3 fwtest4 \
genpot gensub gensub2 gensub3 getlndir gnuops2 gnuops3 gnureops gsubind \
icasefs icasers id igncdym igncfs ignrcas2 ignrcas4 ignrcase \
incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \
@@ -1516,7 +1518,7 @@ LOCALE_CHARSET_TESTS = \
SHLIB_TESTS = \
apiterm fnmatch filefuncs fork fork2 fts functab4 getfile inplace1 inplace2 inplace3 \
- ordchr ordchr2 readdir readfile readfile2 revout revtwoway rwarray testext time
+ ordchr ordchr2 readdir readdir_test readfile readfile2 revout revtwoway rwarray testext time
# List of the tests which should be run with --lint option:
@@ -2626,6 +2628,12 @@ readdir:
-v dirlist=_dirlist -v longlist=_longlist > $@.ok
@-$(CMP) $@.ok _$@ && rm -f $@.ok _$@ _dirlist _longlist
+readdir_test:
+ @echo $@
+ @$(AWK) -lreaddir -F/ '{printf "[%s] [%s] [%s] [%s]\n", $$1, $$2, $$3, $$4}' "$(top_srcdir)" > $@.ok
+ @$(AWK) -lreaddir_test '{printf "[%s] [%s] [%s] [%s]\n", $$1, $$2, $$3, $$4}' "$(top_srcdir)" > _$@
+ @-$(CMP) $@.ok _$@ && rm -f $@.ok _$@
+
fts:
@case `uname` in \
IRIX) \
@@ -2803,6 +2811,12 @@ arrdbg:
@echo $@
@$(AWK) -v "okfile=$(srcdir)/$@.ok" -f "$(srcdir)"/$@.awk | grep array_f >_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ "$(srcdir)"/$@.ok
+# @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ "$(srcdir)"/$@.ok || exit 0
+
+fwtest3:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/fwtest2.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
Gt-dummy:
# file Maketests, generated from Makefile.am by the Gentests program
addcomma:
@@ -3982,7 +3996,7 @@ fwtest2:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-fwtest3:
+fwtest4:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -4457,7 +4471,6 @@ time:
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
# end of file Maketests
-# @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ "$(srcdir)"/$@.ok || exit 0
# Targets generated for other tests:
diff --git a/test/Maketests b/test/Maketests
index d9183c0a..9ff8ef90 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -1177,7 +1177,7 @@ fwtest2:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-fwtest3:
+fwtest4:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
diff --git a/test/fwtest3.awk b/test/fwtest3.awk
index d1384eaf..5e96c1aa 100644
--- a/test/fwtest3.awk
+++ b/test/fwtest3.awk
@@ -1 +1,6 @@
-BEGIN { FIELDWIDTHS="5" } { print $1 }
+BEGIN {
+ FIELDWIDTHS = "2:13 2:13 2:13";
+}
+{
+ printf "%s|%s|%s\n", $1, $2, $3
+}
diff --git a/test/fwtest3.ok b/test/fwtest3.ok
index e56e15bb..f4d28232 100644
--- a/test/fwtest3.ok
+++ b/test/fwtest3.ok
@@ -1 +1,12 @@
-12345
+ 0.4867373206| 1.3206333033|-0.2333178127
+ 0.5668176165| 1.3711756314|-0.2193558040
+ 0.4325251781| 1.3399488722|-0.1568307497
+ 0.4900487563| 1.3295759570|-0.2217392402
+-0.6790064191| 1.2536623801|-0.2955415433
+-0.6311440220| 1.2966579993|-0.2246692210
+-0.7209390351| 1.1783407099|-0.2539408209
+-0.6782473356| 1.2495242556|-0.2811436366
+-0.7062054082| 1.1223820964|-1.1619805834
+-0.6491590119| 1.1248946162|-1.0851579675
+-0.7948856821| 1.1208852325|-1.1259821556
+-0.7102549262| 1.1225121126|-1.1475381286
diff --git a/test/fwtest4.awk b/test/fwtest4.awk
new file mode 100644
index 00000000..d1384eaf
--- /dev/null
+++ b/test/fwtest4.awk
@@ -0,0 +1 @@
+BEGIN { FIELDWIDTHS="5" } { print $1 }
diff --git a/test/fwtest3.in b/test/fwtest4.in
index a32a4347..a32a4347 100644
--- a/test/fwtest3.in
+++ b/test/fwtest4.in
diff --git a/test/fwtest4.ok b/test/fwtest4.ok
new file mode 100644
index 00000000..e56e15bb
--- /dev/null
+++ b/test/fwtest4.ok
@@ -0,0 +1 @@
+12345