aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog137
-rw-r--r--test/Makefile279
-rw-r--r--test/Makefile.in121
-rw-r--r--test/README5
-rw-r--r--test/back89.in2
-rw-r--r--test/back89.ok1
-rw-r--r--test/backgsub.awk4
-rw-r--r--test/backgsub.in1
-rw-r--r--test/backgsub.ok1
-rw-r--r--test/badargs.ok5
-rw-r--r--test/clsflnam.awk12
-rw-r--r--test/clsflnam.in3
-rw-r--r--test/clsflnam.ok0
-rw-r--r--test/dynlj.awk1
-rw-r--r--test/dynlj.ok1
-rw-r--r--test/eofsplit.awk68
-rw-r--r--test/eofsplit.ok0
-rw-r--r--test/fldchgnf.awk1
-rw-r--r--test/fldchgnf.in1
-rw-r--r--test/fldchgnf.ok2
-rw-r--r--test/fnarray.awk7
-rw-r--r--test/fnarray.ok1
-rw-r--r--test/gensub.awk1
-rw-r--r--test/gensub.ok1
-rw-r--r--test/getlnhd.awk10
-rw-r--r--test/getlnhd.ok2
-rw-r--r--test/gsubasgn.awk13
-rw-r--r--test/gsubasgn.ok4
-rw-r--r--test/gsubtest.awk8
-rw-r--r--test/gsubtest.ok6
-rw-r--r--test/mmap8k.in143
-rw-r--r--test/nlfldsep.ok13
-rwxr-xr-xtest/nlfldsep.sh10
-rw-r--r--test/prt1eval.awk6
-rw-r--r--test/prt1eval.ok1
-rw-r--r--test/prtoeval.awk4
-rw-r--r--test/prtoeval.ok2
-rw-r--r--test/rand.awk2
-rw-r--r--test/rand.ok1
-rw-r--r--test/reindops.awk6
-rw-r--r--test/reindops.in1
-rw-r--r--test/reindops.ok1
-rw-r--r--test/splitvar.awk5
-rw-r--r--test/splitvar.in1
-rw-r--r--test/splitvar.ok1
-rw-r--r--test/splitwht.awk7
-rw-r--r--test/splitwht.ok2
-rw-r--r--test/sprintfc.awk1
-rw-r--r--test/sprintfc.in3
-rw-r--r--test/sprintfc.ok3
-rw-r--r--test/strftime.ok1
-rw-r--r--test/substr.awk5
-rw-r--r--test/substr.ok1
-rw-r--r--test/tradanch.awk2
-rw-r--r--test/tradanch.in2
-rw-r--r--test/tradanch.ok0
-rw-r--r--test/tweakfld.awk296
-rw-r--r--test/tweakfld.in3
-rw-r--r--test/tweakfld.ok3
59 files changed, 928 insertions, 296 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 570c031b..53a1b541 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,140 @@
+Thu Nov 7 09:12:20 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * Makefile.in (splitvar): new test case.
+ * splitvar.awk, splitvar.in, splitvar.ok: new files.
+
+Sun Nov 3 10:55:50 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * Makefile.in (nlfldsep): new test case.
+ * nlfldsep.sh, nlfldsep.ok: new files.
+
+Fri Oct 25 10:29:56 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * rand.awk: call srand with fixed seed.
+ * rand.ok: new file.
+ * Makefile.in (rand): changed to compare output with rand.ok.
+
+Sat Oct 19 21:52:04 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * Makefile.in (tradanch): new test case.
+ * tradanch.awk, tradanch.in, tradanch.ok: new files.
+
+Thu Oct 17 21:22:05 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * tweakfld.awk: move `rm' out into Makefile.in.
+ * eofsplit.awk: fixed buggy code so won't loop forever.
+ * Makefile.in (all): add unix-tests.
+ (unix-tests): new target, has pound-bang, fflush, getlnhd.
+ (basic): removed fflush, getlnhd.
+ (tweakfld): added rm from tweakfld.awk.
+
+Sun Oct 6 22:00:35 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * Makefile.in (back89): new test case.
+ * back89.in, back89.ok: new files.
+
+Sun Oct 6 20:45:54 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * Makefile.in (splitwht): new test case.
+ * splitwht.awk, splitwht.ok: new files.
+
+Sun Sep 29 23:14:20 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * Makefile.in (gsubtest): new test case.
+ * gsubtest.awk, gsubtest.ok: new files.
+
+Fri Sep 20 11:58:40 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * Makefile.in (prtoeval): new test case.
+ * prtoeval.awk, prtoeval.ok: new files.
+
+Tue Sep 10 06:26:44 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * Makefile.in (gsubasgn): new test case.
+ * gsubasgn.awk, gsubasgn.ok: new files.
+
+Wed Aug 28 22:06:33 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * badargs.ok: updated output corresponding to change made to
+ main.c (see main ChangeLog).
+
+Thu Aug 1 07:20:28 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * Makefile.in (clean): remove out[123] files from `messages' test.
+ Thanks to Pat Rankin (rankin@eql.caltech.edu).
+
+Sat Jul 27 23:56:57 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * Makefile.in (prt1eval): new test case.
+ * prt1eval.awk, prt1eval.ok: new files.
+
+Mon Jul 22 22:06:10 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * Makefile.in (eofsplit): new test case.
+ * eofsplit.awk, eofsplit.ok: new files.
+
+Sun Jul 14 07:07:45 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * Makefile.in (fldchgnf): new test case.
+ * fldchgnf.awk, fldchgnf.ok: new files.
+
+Tue May 21 23:23:22 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * Makefile.in (substr): new test case.
+ * substr.awk, substr.ok: new files.
+
+Tue May 14 15:05:23 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * Makefile.in (dynlj): new test case.
+ * dynlj.awk, dynlj.ok: new files.
+
+Sun May 12 20:45:34 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * Makefile.in (fnarray): new test case.
+ * fnarray.awk, fnarray.ok: new files.
+
+Fri Mar 15 06:46:48 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * Makefile.in (clean): added `*~' to list of files to be removed.
+ * tweakfld.awk (END): added to do clean up action.
+
+Thu Mar 14 16:41:32 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * Makefile.in (mmap8k): new test case.
+ * mmap8k.in, mmap8k.ok: new files.
+
+Sun Mar 10 22:58:35 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * Makefile.in (clsflnam): new test case.
+ * clsflnam.in, clsflnam.awk, clsflnam.ok: new files.
+ * tweakfld.awk: changed to have a fixed date.
+
+Thu Mar 7 09:56:09 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * Makefile.in (tweakfld): new test case.
+ * tweakfld.in, tweakfld.awk, tweakfld.ok: new files.
+
+Sun Mar 3 06:51:26 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * Makefile.in (getlnhd, backgsub) : new test cases.
+ * getlnhd.awk, getlnhd.ok: new files.
+ * backgsub.in, backgsub.awk, backgsub.ok: new files.
+
+Mon Feb 26 22:30:02 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * Makefile.in (sprintfc): new test case.
+ * sprintfc.in, sprintfc.awk, sprintfc.ok: new files.
+ * gensub.awk: updated for case of no match of regex.
+
+Wed Jan 24 10:06:16 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
+
+ * Makefile.in (distclean, maintainer-clean): new targets.
+ (reindops): added test from Rick Adams (rick@uunet.uu.net).
+ (arrayparm, paramdup, defref, strftime, prmarscl, sclforin,
+ sclifin): Fix from Larry Schwimmer (schwim@cyclone.stanford.edu)
+ so that tests that are supposed to fail use `... || exit 0' to
+ cause a clean `make clean'.
+
Wed Jan 10 22:58:55 1996 Arnold D. Robbins <arnold@skeeve.atl.ga.us>
* ChangeLog created.
diff --git a/test/Makefile b/test/Makefile
deleted file mode 100644
index 1ec91c45..00000000
--- a/test/Makefile
+++ /dev/null
@@ -1,279 +0,0 @@
-# Generated automatically from Makefile.in by configure.
-# Makefile for GNU Awk test suite.
-#
-# Copyright (C) 1988-1995 the Free Software Foundation, Inc.
-#
-# This file is part of GAWK, the GNU implementation of the
-# AWK Programming Language.
-#
-# GAWK is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# GAWK is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-
-SHELL = /bin/sh
-AWK = ../gawk
-CMP = cmp
-
-srcdir = .
-
-bigtest: basic poundbang gawk.extensions
-
-basic: msg swaplns messages argarray longwrds \
- getline fstabplus compare arrayref rs fsrs rand \
- fsbs negexp asgext anchgsub splitargv awkpath nfset reparse \
- convfmt arrayparm paramdup nonl defref nofmtch litoct resplit \
- rswhite prmarscl sclforin sclifin intprec childin noeffect \
- numsubstr pcntplus prmreuse math fflush fldchg
-
-gawk.extensions: fieldwdth ignrcase posix manyfiles igncfs argtest \
- badargs strftime gensub gnureops
-
-extra: regtest inftest
-
-poundbang::
- cp $(AWK) /tmp/gawk && $(srcdir)/poundbang $(srcdir)/poundbang >_`basename $@`
- rm -f /tmp/gawk
- $(CMP) $(srcdir)/poundbang.ok _`basename $@` && rm -f _`basename $@`
-
-msg::
- @echo 'Any output from "cmp" is bad news, although some differences'
- @echo 'in floating point values are probably benign -- in particular,'
- @echo 'some systems may omit a leading zero and the floating point'
- @echo 'precision may lead to slightly different output in a few cases.'
-
-swaplns::
- @$(AWK) -f $(srcdir)/swaplns.awk $(srcdir)/swaplns.in >_$@
- $(CMP) $(srcdir)/swaplns.ok _$@ && rm -f _$@
-
-messages::
- @$(AWK) -f $(srcdir)/messages.awk >out2 2>out3
- { $(CMP) $(srcdir)/out1.ok out1 && $(CMP) $(srcdir)/out2.ok out2 && $(CMP) $(srcdir)/out3.ok out3 && rm -f out1 out2 out3; } || { test -d /dev/fd && echo IT IS OK THAT THIS TEST FAILED; }
-
-argarray::
- @case $(srcdir) in \
- .) : ;; \
- *) cp $(srcdir)/argarray.in . ;; \
- esac
- @TEST=test echo just a test | $(AWK) -f $(srcdir)/argarray.awk ./argarray.in - >_$@
- $(CMP) $(srcdir)/argarray.ok _$@ && rm -f _$@
-
-fstabplus::
- @echo '1 2' | $(AWK) -f $(srcdir)/fstabplus.awk >_$@
- $(CMP) $(srcdir)/fstabplus.ok _$@ && rm -f _$@
-
-fsrs::
- @$(AWK) -f $(srcdir)/fsrs.awk $(srcdir)/fsrs.in >_$@
- $(CMP) $(srcdir)/fsrs.ok _$@ && rm -f _$@
-
-igncfs::
- @$(AWK) -f $(srcdir)/igncfs.awk $(srcdir)/igncfs.in >_$@
- $(CMP) $(srcdir)/igncfs.ok _$@ && rm -f _$@
-
-longwrds::
- @$(AWK) -f $(srcdir)/longwrds.awk $(srcdir)/manpage | sort >_$@
- $(CMP) $(srcdir)/longwrds.ok _$@ && rm -f _$@
-
-fieldwdth::
- @echo '123456789' | $(AWK) -v FIELDWIDTHS="2 3 4" '{ print $$2}' >_$@
- $(CMP) $(srcdir)/fieldwdth.ok _$@ && rm -f _$@
-
-ignrcase::
- @echo xYz | $(AWK) -v IGNORECASE=1 '{ sub(/y/, ""); print}' >_$@
- $(CMP) $(srcdir)/ignrcase.ok _$@ && rm -f _$@
-
-regtest::
- @echo 'Some of the output from regtest is very system specific, do not'
- @echo 'be distressed if your output differs from that distributed.'
- @echo 'Manual inspection is called for.'
- AWK=`pwd`/$(AWK) $(srcdir)/regtest
-
-posix::
- @echo '1:2,3 4' | $(AWK) -f $(srcdir)/posix.awk >_$@
- $(CMP) $(srcdir)/posix.ok _$@ && rm -f _$@
-
-manyfiles::
- @rm -rf junk
- @mkdir junk
- @$(AWK) 'BEGIN { for (i = 1; i <= 300; i++) print i, i}' >_$@
- @$(AWK) -f $(srcdir)/manyfiles.awk _$@ _$@
- @echo "This number better be 1 ->" | tr -d '\012'
- @wc -l junk/* | $(AWK) '$$1 != 2' | wc -l
- @rm -rf junk _$@
-
-compare::
- @$(AWK) -f $(srcdir)/compare.awk 0 1 $(srcdir)/compare.in >_$@
- $(CMP) $(srcdir)/compare.ok _$@ && rm -f _$@
-
-arrayref::
- @$(AWK) -f $(srcdir)/arrayref.awk >_$@
- $(CMP) $(srcdir)/arrayref.ok _$@ && rm -f _$@
-
-rs::
- @$(AWK) -v RS="" '{ print $$1, $$2}' $(srcdir)/rs.in >_$@
- $(CMP) $(srcdir)/rs.ok _$@ && rm -f _$@
-
-fsbs::
- @$(AWK) -v FS='\' '{ print $$1, $$2 }' $(srcdir)/fsbs.in >_$@
- $(CMP) $(srcdir)/fsbs.ok _$@ && rm -f _$@
-
-inftest::
- @echo This test is very machine specific...
- @$(AWK) -f $(srcdir)/inftest.awk >_$@
- $(CMP) $(srcdir)/inftest.ok _$@ && rm -f _$@
-
-getline::
- @$(AWK) -f $(srcdir)/getline.awk $(srcdir)/getline.awk $(srcdir)/getline.awk >_$@
- $(CMP) $(srcdir)/getline.ok _$@ && rm -f _$@
-
-rand::
- @echo The following line should just be 19 random numbers between 1 and 100
- @$(AWK) -f $(srcdir)/rand.awk
-
-negexp::
- @$(AWK) 'BEGIN { a = -2; print 10^a }' >_$@
- $(CMP) $(srcdir)/negexp.ok _$@ && rm -f _$@
-
-asgext::
- @$(AWK) -f $(srcdir)/asgext.awk $(srcdir)/asgext.in >_$@
- $(CMP) $(srcdir)/asgext.ok _$@ && rm -f _$@
-
-anchgsub::
- @$(AWK) -f $(srcdir)/anchgsub.awk $(srcdir)/anchgsub.in >_$@
- $(CMP) $(srcdir)/anchgsub.ok _$@ && rm -f _$@
-
-splitargv::
- @$(AWK) -f $(srcdir)/splitargv.awk $(srcdir)/splitargv.in >_$@
- $(CMP) $(srcdir)/splitargv.ok _$@ && rm -f _$@
-
-awkpath::
- @AWKPATH="$(srcdir):$(srcdir)/lib" $(AWK) -f awkpath.awk >_$@
- $(CMP) $(srcdir)/awkpath.ok _$@ && rm -f _$@
-
-nfset::
- @$(AWK) -f $(srcdir)/nfset.awk $(srcdir)/nfset.in >_$@
- $(CMP) $(srcdir)/nfset.ok _$@ && rm -f _$@
-
-reparse::
- @$(AWK) -f $(srcdir)/reparse.awk $(srcdir)/reparse.in >_$@
- $(CMP) $(srcdir)/reparse.ok _$@ && rm -f _$@
-
-argtest::
- @$(AWK) -f $(srcdir)/argtest.awk -x -y abc >_$@
- $(CMP) $(srcdir)/argtest.ok _$@ && rm -f _$@
-
-badargs::
- @-$(AWK) -f 2>&1 | grep -v patchlevel >_$@
- $(CMP) $(srcdir)/badargs.ok _$@ && rm -f _$@
-
-convfmt::
- @$(AWK) -f $(srcdir)/convfmt.awk >_$@
- $(CMP) $(srcdir)/convfmt.ok _$@ && rm -f _$@
-
-arrayparm::
- @-AWKPATH=$(srcdir) $(AWK) -f arrayparm.awk >_$@ 2>&1
- $(CMP) $(srcdir)/arrayparm.ok _$@ && rm -f _$@
-
-paramdup::
- @-AWKPATH=$(srcdir) $(AWK) -f paramdup.awk >_$@ 2>&1
- $(CMP) $(srcdir)/paramdup.ok _$@ && rm -f _$@
-
-nonl::
- @-AWKPATH=$(srcdir) $(AWK) --lint -f nonl.awk /dev/null >_$@ 2>&1
- $(CMP) $(srcdir)/nonl.ok _$@ && rm -f _$@
-
-defref::
- @-AWKPATH=$(srcdir) $(AWK) --lint -f defref.awk >_$@ 2>&1
- $(CMP) $(srcdir)/defref.ok _$@ && rm -f _$@
-
-nofmtch::
- @-AWKPATH=$(srcdir) $(AWK) --lint -f nofmtch.awk >_$@ 2>&1
- $(CMP) $(srcdir)/nofmtch.ok _$@ && rm -f _$@
-
-strftime::
- : this test could fail on slow machines or on a second boundary,
- : so if it does, double check the actual results
- @date | $(AWK) '{ $$3 = sprintf("%02d", $$3 + 0) ; \
- print > "strftime.ok" ; \
- print strftime() > "'_$@'" }'
- -$(CMP) strftime.ok _$@ && rm -f _$@ strftime.ok
-
-litoct::
- @echo ab | $(AWK) --traditional -f $(srcdir)/litoct.awk >_$@
- $(CMP) $(srcdir)/litoct.ok _$@ && rm -f _$@
-
-gensub::
- @$(AWK) -f $(srcdir)/gensub.awk $(srcdir)/gensub.in >_$@
- $(CMP) $(srcdir)/gensub.ok _$@ && rm -f _$@
-
-resplit::
- @echo a:b:c d:e:f | $(AWK) '{ FS = ":"; $$0 = $$0; print $$2 }' > _$@
- $(CMP) $(srcdir)/resplit.ok _$@ && rm -f _$@
-
-rswhite::
- @$(AWK) -f $(srcdir)/rswhite.awk $(srcdir)/rswhite.in > _$@
- $(CMP) $(srcdir)/rswhite.ok _$@ && rm -f _$@
-
-prmarscl::
- @-AWKPATH=$(srcdir) $(AWK) -f prmarscl.awk > _$@ 2>&1
- $(CMP) $(srcdir)/prmarscl.ok _$@ && rm -f _$@
-
-sclforin::
- @-AWKPATH=$(srcdir) $(AWK) -f sclforin.awk > _$@ 2>&1
- $(CMP) $(srcdir)/sclforin.ok _$@ && rm -f _$@
-
-sclifin::
- @-AWKPATH=$(srcdir) $(AWK) -f sclifin.awk > _$@ 2>&1
- $(CMP) $(srcdir)/sclifin.ok _$@ && rm -f _$@
-
-intprec::
- @-$(AWK) -f $(srcdir)/intprec.awk > _$@ 2>&1
- $(CMP) $(srcdir)/intprec.ok _$@ && rm -f _$@
-
-childin::
- @echo hi | $(AWK) 'BEGIN { "cat" | getline; print; close("cat") }' > _$@
- $(CMP) $(srcdir)/childin.ok _$@ && rm -f _$@
-
-noeffect::
- @-AWKPATH=$(srcdir) $(AWK) --lint -f noeffect.awk > _$@ 2>&1
- $(CMP) $(srcdir)/noeffect.ok _$@ && rm -f _$@
-
-numsubstr::
- @-AWKPATH=$(srcdir) $(AWK) -f numsubstr.awk $(srcdir)/numsubstr.in >_$@
- $(CMP) $(srcdir)/numsubstr.ok _$@ && rm -f _$@
-
-gnureops::
- @$(AWK) -f $(srcdir)/gnureops.awk >_$@
- $(CMP) $(srcdir)/gnureops.ok _$@ && rm -f _$@
-
-pcntplus::
- @$(AWK) -f $(srcdir)/pcntplus.awk >_$@
- $(CMP) $(srcdir)/pcntplus.ok _$@ && rm -f _$@
-
-prmreuse::
- @$(AWK) -f $(srcdir)/prmreuse.awk >_$@
- $(CMP) $(srcdir)/prmreuse.ok _$@ && rm -f _$@
-
-math::
- @$(AWK) -f $(srcdir)/math.awk >_$@
- $(CMP) $(srcdir)/math.ok _$@ && rm -f _$@
-
-fflush::
- @$(srcdir)/fflush.sh >_$@
- $(CMP) $(srcdir)/fflush.ok _$@ && rm -f _$@
-
-fldchg::
- @$(AWK) -f $(srcdir)/fldchg.awk $(srcdir)/fldchg.in >_$@
- $(CMP) $(srcdir)/fldchg.ok _$@ && rm -f _$@
-
-clean:
- rm -fr _* core junk
diff --git a/test/Makefile.in b/test/Makefile.in
index 52036d75..c8299e51 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1,6 +1,6 @@
# Makefile for GNU Awk test suite.
#
-# Copyright (C) 1988-1995 the Free Software Foundation, Inc.
+# Copyright (C) 1988-1996 the Free Software Foundation, Inc.
#
# This file is part of GAWK, the GNU implementation of the
# AWK Programming Language.
@@ -26,14 +26,19 @@ CMP = cmp
srcdir = @srcdir@
VPATH = @srcdir@
-bigtest: basic poundbang gawk.extensions
+bigtest: basic unix-tests gawk.extensions
basic: msg swaplns messages argarray longwrds \
getline fstabplus compare arrayref rs fsrs rand \
fsbs negexp asgext anchgsub splitargv awkpath nfset reparse \
convfmt arrayparm paramdup nonl defref nofmtch litoct resplit \
rswhite prmarscl sclforin sclifin intprec childin noeffect \
- numsubstr pcntplus prmreuse math fflush fldchg
+ numsubstr pcntplus prmreuse math fldchg fldchgnf reindops \
+ sprintfc backgsub tweakfld clsflnam mmap8k fnarray \
+ dynlj substr eofsplit prt1eval gsubasgn prtoeval gsubtest splitwht \
+ back89 tradanch nlfldsep splitvar
+
+unix-tests: poundbang fflush getlnhd
gawk.extensions: fieldwdth ignrcase posix manyfiles igncfs argtest \
badargs strftime gensub gnureops
@@ -136,8 +141,8 @@ getline::
$(CMP) $(srcdir)/getline.ok _$@ && rm -f _$@
rand::
- @echo The following line should just be 19 random numbers between 1 and 100
- @$(AWK) -f $(srcdir)/rand.awk
+ @$(AWK) -f $(srcdir)/rand.awk >_$@
+ $(CMP) $(srcdir)/rand.ok _$@ && rm -f _$@
negexp::
@$(AWK) 'BEGIN { a = -2; print 10^a }' >_$@
@@ -180,11 +185,11 @@ convfmt::
$(CMP) $(srcdir)/convfmt.ok _$@ && rm -f _$@
arrayparm::
- @-AWKPATH=$(srcdir) $(AWK) -f arrayparm.awk >_$@ 2>&1
+ @-AWKPATH=$(srcdir) $(AWK) -f arrayparm.awk >_$@ 2>&1 || exit 0
$(CMP) $(srcdir)/arrayparm.ok _$@ && rm -f _$@
paramdup::
- @-AWKPATH=$(srcdir) $(AWK) -f paramdup.awk >_$@ 2>&1
+ @-AWKPATH=$(srcdir) $(AWK) -f paramdup.awk >_$@ 2>&1 || exit 0
$(CMP) $(srcdir)/paramdup.ok _$@ && rm -f _$@
nonl::
@@ -192,7 +197,7 @@ nonl::
$(CMP) $(srcdir)/nonl.ok _$@ && rm -f _$@
defref::
- @-AWKPATH=$(srcdir) $(AWK) --lint -f defref.awk >_$@ 2>&1
+ @-AWKPATH=$(srcdir) $(AWK) --lint -f defref.awk >_$@ 2>&1 || exit 0
$(CMP) $(srcdir)/defref.ok _$@ && rm -f _$@
nofmtch::
@@ -205,7 +210,7 @@ strftime::
@date | $(AWK) '{ $$3 = sprintf("%02d", $$3 + 0) ; \
print > "strftime.ok" ; \
print strftime() > "'_$@'" }'
- -$(CMP) strftime.ok _$@ && rm -f _$@ strftime.ok
+ $(CMP) strftime.ok _$@ && rm -f _$@ strftime.ok || exit 0
litoct::
@echo ab | $(AWK) --traditional -f $(srcdir)/litoct.awk >_$@
@@ -224,15 +229,15 @@ rswhite::
$(CMP) $(srcdir)/rswhite.ok _$@ && rm -f _$@
prmarscl::
- @-AWKPATH=$(srcdir) $(AWK) -f prmarscl.awk > _$@ 2>&1
+ @-AWKPATH=$(srcdir) $(AWK) -f prmarscl.awk > _$@ 2>&1 || exit 0
$(CMP) $(srcdir)/prmarscl.ok _$@ && rm -f _$@
sclforin::
- @-AWKPATH=$(srcdir) $(AWK) -f sclforin.awk > _$@ 2>&1
+ @-AWKPATH=$(srcdir) $(AWK) -f sclforin.awk > _$@ 2>&1 || exit 0
$(CMP) $(srcdir)/sclforin.ok _$@ && rm -f _$@
sclifin::
- @-AWKPATH=$(srcdir) $(AWK) -f sclifin.awk > _$@ 2>&1
+ @-AWKPATH=$(srcdir) $(AWK) -f sclifin.awk > _$@ 2>&1 || exit 0
$(CMP) $(srcdir)/sclifin.ok _$@ && rm -f _$@
intprec::
@@ -275,5 +280,95 @@ fldchg::
@$(AWK) -f $(srcdir)/fldchg.awk $(srcdir)/fldchg.in >_$@
$(CMP) $(srcdir)/fldchg.ok _$@ && rm -f _$@
+fldchgnf::
+ @$(AWK) -f $(srcdir)/fldchgnf.awk $(srcdir)/fldchgnf.in >_$@
+ $(CMP) $(srcdir)/fldchgnf.ok _$@ && rm -f _$@
+
+reindops::
+ @$(AWK) -f $(srcdir)/reindops.awk $(srcdir)/reindops.in >_$@
+ $(CMP) $(srcdir)/reindops.ok _$@ && rm -f _$@
+
+sprintfc::
+ @$(AWK) -f $(srcdir)/sprintfc.awk $(srcdir)/sprintfc.in >_$@
+ $(CMP) $(srcdir)/sprintfc.ok _$@ && rm -f _$@
+
+getlnhd::
+ @$(AWK) -f $(srcdir)/getlnhd.awk >_$@
+ $(CMP) $(srcdir)/getlnhd.ok _$@ && rm -f _$@
+
+backgsub::
+ @$(AWK) -f $(srcdir)/backgsub.awk $(srcdir)/backgsub.in >_$@
+ $(CMP) $(srcdir)/backgsub.ok _$@ && rm -f _$@
+
+tweakfld::
+ @$(AWK) -f $(srcdir)/tweakfld.awk $(srcdir)/tweakfld.in >_$@
+ @rm -f errors.cleanup
+ $(CMP) $(srcdir)/tweakfld.ok _$@ && rm -f _$@
+
+clsflnam::
+ @$(AWK) -f $(srcdir)/clsflnam.awk $(srcdir)/clsflnam.in >_$@
+ $(CMP) $(srcdir)/clsflnam.ok _$@ && rm -f _$@
+
+mmap8k::
+ @$(AWK) '{ print }' $(srcdir)/mmap8k.in >_$@
+ $(CMP) $(srcdir)/mmap8k.in _$@ && rm -f _$@
+
+fnarray::
+ @-AWKPATH=$(srcdir) $(AWK) -f fnarray.awk >_$@ 2>&1 || exit 0
+ $(CMP) $(srcdir)/fnarray.ok _$@ && rm -f _$@
+
+dynlj::
+ @$(AWK) -f $(srcdir)/dynlj.awk >_$@
+ $(CMP) $(srcdir)/dynlj.ok _$@ && rm -f _$@
+
+substr::
+ @$(AWK) -f $(srcdir)/substr.awk >_$@
+ $(CMP) $(srcdir)/substr.ok _$@ && rm -f _$@
+
+eofsplit::
+ @$(AWK) -f $(srcdir)/eofsplit.awk >_$@
+ $(CMP) $(srcdir)/eofsplit.ok _$@ && rm -f _$@
+
+prt1eval::
+ @$(AWK) -f $(srcdir)/prt1eval.awk >_$@
+ $(CMP) $(srcdir)/prt1eval.ok _$@ && rm -f _$@
+
+gsubasgn::
+ @-AWKPATH=$(srcdir) $(AWK) -f gsubasgn.awk >_$@ 2>&1 || exit 0
+ $(CMP) $(srcdir)/gsubasgn.ok _$@ && rm -f _$@
+
+prtoeval::
+ @$(AWK) -f $(srcdir)/prtoeval.awk >_$@
+ $(CMP) $(srcdir)/prtoeval.ok _$@ && rm -f _$@
+
+gsubtest::
+ @$(AWK) -f $(srcdir)/gsubtest.awk >_$@
+ $(CMP) $(srcdir)/gsubtest.ok _$@ && rm -f _$@
+
+splitwht::
+ @$(AWK) -f $(srcdir)/splitwht.awk >_$@
+ $(CMP) $(srcdir)/splitwht.ok _$@ && rm -f _$@
+
+back89::
+ @$(AWK) '/a\8b/' $(srcdir)/back89.in >_$@
+ $(CMP) $(srcdir)/back89.ok _$@ && rm -f _$@
+
+tradanch::
+ @$(AWK) --traditional -f $(srcdir)/tradanch.awk $(srcdir)/tradanch.in >_$@
+ $(CMP) $(srcdir)/tradanch.ok _$@ && rm -f _$@
+
+nlfldsep::
+ AWK=$(AWK); export AWK; $(srcdir)/nlfldsep.sh > _$@
+ $(CMP) $(srcdir)/nlfldsep.ok _$@ && rm -f _$@
+
+splitvar::
+ @$(AWK) -f $(srcdir)/splitvar.awk $(srcdir)/splitvar.in >_$@
+ $(CMP) $(srcdir)/splitvar.ok _$@ && rm -f _$@
+
clean:
- rm -fr _* core junk
+ rm -fr _* core junk out1 out2 out3 strftime.ok *~
+
+distclean: clean
+ rm -f Makefile
+
+maintainer-clean: distclean
diff --git a/test/README b/test/README
index 725d7d98..2343be2f 100644
--- a/test/README
+++ b/test/README
@@ -1,4 +1,4 @@
-Wed Aug 16 12:22:45 PDT 1995
+Mon Jan 22 13:08:58 EST 1996
This directory contains the tests for gawk. The tests use the
following conventions.
@@ -13,3 +13,6 @@ _foo --- the actual results; generated at run time
The _foo file will be left around if a test fails, allowing you to
compare actual and expected results, in case they differ.
+
+If they do differ (other than strftime.ok and _strftime!), send in a
+bug report. See the manual for the bug report procedure.
diff --git a/test/back89.in b/test/back89.in
new file mode 100644
index 00000000..b0a88f24
--- /dev/null
+++ b/test/back89.in
@@ -0,0 +1,2 @@
+a8b
+a\8b
diff --git a/test/back89.ok b/test/back89.ok
new file mode 100644
index 00000000..e9ea4d5f
--- /dev/null
+++ b/test/back89.ok
@@ -0,0 +1 @@
+a8b
diff --git a/test/backgsub.awk b/test/backgsub.awk
new file mode 100644
index 00000000..bec73549
--- /dev/null
+++ b/test/backgsub.awk
@@ -0,0 +1,4 @@
+{
+ gsub( "\\\\", "\\\\")
+ print
+}
diff --git a/test/backgsub.in b/test/backgsub.in
new file mode 100644
index 00000000..2d3f17f0
--- /dev/null
+++ b/test/backgsub.in
@@ -0,0 +1 @@
+\x\y\z
diff --git a/test/backgsub.ok b/test/backgsub.ok
new file mode 100644
index 00000000..e2e265fa
--- /dev/null
+++ b/test/backgsub.ok
@@ -0,0 +1 @@
+\\x\\y\\z
diff --git a/test/badargs.ok b/test/badargs.ok
index a4652933..c89e520f 100644
--- a/test/badargs.ok
+++ b/test/badargs.ok
@@ -5,7 +5,7 @@ POSIX options: GNU long options:
-f progfile --file=progfile
-F fs --field-separator=fs
-v var=val --assign=var=val
- -m[fr]=val
+ -m[fr] val
-W compat --compat
-W copyleft --copyleft
-W copyright --copyright
@@ -18,3 +18,6 @@ POSIX options: GNU long options:
-W traditional --traditional
-W usage --usage
-W version --version
+
+Report bugs to bug-gnu-utils@prep.ai.mit.edu,
+with a Cc: to arnold@gnu.ai.mit.edu
diff --git a/test/clsflnam.awk b/test/clsflnam.awk
new file mode 100644
index 00000000..53928912
--- /dev/null
+++ b/test/clsflnam.awk
@@ -0,0 +1,12 @@
+#! /usr/bin/awk -f
+BEGIN {
+ getline
+# print ("FILENAME =", FILENAME) > "/dev/stderr"
+ #Rewind the file
+ if (close(FILENAME)) {
+ print "Error " ERRNO " closing input file" > "/dev/stderr";
+ exit;
+ }
+}
+{ print "Analysing ", $0 }
+
diff --git a/test/clsflnam.in b/test/clsflnam.in
new file mode 100644
index 00000000..a92d664b
--- /dev/null
+++ b/test/clsflnam.in
@@ -0,0 +1,3 @@
+line 1
+line 2
+line 3
diff --git a/test/clsflnam.ok b/test/clsflnam.ok
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/clsflnam.ok
diff --git a/test/dynlj.awk b/test/dynlj.awk
new file mode 100644
index 00000000..ec6851bb
--- /dev/null
+++ b/test/dynlj.awk
@@ -0,0 +1 @@
+BEGIN { printf "%*sworld\n", -20, "hello" }
diff --git a/test/dynlj.ok b/test/dynlj.ok
new file mode 100644
index 00000000..c8f3fe9d
--- /dev/null
+++ b/test/dynlj.ok
@@ -0,0 +1 @@
+hello world
diff --git a/test/eofsplit.awk b/test/eofsplit.awk
new file mode 100644
index 00000000..22042b44
--- /dev/null
+++ b/test/eofsplit.awk
@@ -0,0 +1,68 @@
+# Date: Sat, 30 Mar 1996 12:47:17 -0800 (PST)
+# From: Charles Howes <chowes@grid.direct.ca>
+# To: bug-gnu-utils@prep.ai.mit.edu, arnold@gnu.ai.mit.edu
+# Subject: Bug in Gawk 3.0.0, sample code:
+#
+#!/usr/local/bin/gawk -f
+#
+# Hello! This is a bug report from chowes@direct.ca
+#
+# uname -a
+# SunOS hostname 5.5 Generic sun4m
+#
+# Gnu Awk (gawk) 3.0, patchlevel 0:
+BEGIN{
+FS=":"
+while ((getline < "/etc/passwd") > 0) {
+ r=$3
+ z=0
+ n[0]=1
+ }
+FS=" "
+}
+#gawk: fp.new:16: fatal error: internal error
+#Abort
+
+# #!/usr/local/bin/gawk -f
+# # Gnu Awk (gawk) 2.15, patchlevel 6
+#
+# BEGIN{
+# f="/etc/passwd"
+# while (getline < f) n[0]=1
+# FS=" "
+# }
+# #gawk: /staff/chowes/bin/fp:7: fatal error: internal error
+# #Abort
+
+# These examples are not perfect coding style because I took a real
+# piece of code and tried to strip away anything that didn't make the error
+# message go away.
+#
+# The interesting part of the 'truss' is:
+#
+# fstat(3, 0xEFFFF278) = 0
+# lseek(3, 0, SEEK_SET) = 0
+# read(3, " r o o t : x : 0 : 1 : S".., 2291) = 2291
+# brk(0x00050020) = 0
+# brk(0x00052020) = 0
+# read(3, 0x0004F4B8, 2291) = 0
+# close(3) = 0
+# Incurred fault #6, FLTBOUNDS %pc = 0x0001B810
+# siginfo: SIGSEGV SEGV_MAPERR addr=0x00053000
+# Received signal #11, SIGSEGV [caught]
+# siginfo: SIGSEGV SEGV_MAPERR addr=0x00053000
+# write(2, " g a w k", 4) = 4
+# write(2, " : ", 2) = 2
+#
+# --
+# Charles Howes -- chowes@direct.ca Voice: (604) 691-1607
+# System Administrator Fax: (604) 691-1605
+# Internet Direct - 1050 - 555 West Hastings St - Vancouver, BC V6B 4N6
+#
+# A sysadmin's life is a sorry one. The only advantage he has over Emergency
+# Room doctors is that malpractice suits are rare. On the other hand, ER
+# doctors never have to deal with patients installing new versions of their
+# own innards! -Michael O'Brien
+#
+# "I think I know what may have gone wrong in the original s/w.
+# It's a bug in the way it was written." - Vagueness**n
diff --git a/test/eofsplit.ok b/test/eofsplit.ok
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/eofsplit.ok
diff --git a/test/fldchgnf.awk b/test/fldchgnf.awk
new file mode 100644
index 00000000..fbb8f118
--- /dev/null
+++ b/test/fldchgnf.awk
@@ -0,0 +1 @@
+{ OFS = ":"; $2 = ""; print $0; print NF }
diff --git a/test/fldchgnf.in b/test/fldchgnf.in
new file mode 100644
index 00000000..8e13e468
--- /dev/null
+++ b/test/fldchgnf.in
@@ -0,0 +1 @@
+a b c d
diff --git a/test/fldchgnf.ok b/test/fldchgnf.ok
new file mode 100644
index 00000000..10b38edd
--- /dev/null
+++ b/test/fldchgnf.ok
@@ -0,0 +1,2 @@
+a::c:d
+4
diff --git a/test/fnarray.awk b/test/fnarray.awk
new file mode 100644
index 00000000..92a18b98
--- /dev/null
+++ b/test/fnarray.awk
@@ -0,0 +1,7 @@
+function foo(N) {
+ return 0
+}
+BEGIN {
+ Num = foo[c]
+}
+
diff --git a/test/fnarray.ok b/test/fnarray.ok
new file mode 100644
index 00000000..94beacdd
--- /dev/null
+++ b/test/fnarray.ok
@@ -0,0 +1 @@
+gawk: fnarray.awk:5: fatal: attempt to use function `foo' as array
diff --git a/test/gensub.awk b/test/gensub.awk
index 33a2a5e4..f91d84dc 100644
--- a/test/gensub.awk
+++ b/test/gensub.awk
@@ -4,3 +4,4 @@ BEGIN { a = "this is a test of gawk"
}
NR == 1 { print gensub(/b/, "BB", 2) }
NR == 2 { print gensub(/c/, "CC", "global") }
+END { print gensub(/foo/, "bar", 1, "DON'T PANIC") }
diff --git a/test/gensub.ok b/test/gensub.ok
index c909cd0d..b9ea3dec 100644
--- a/test/gensub.ok
+++ b/test/gensub.ok
@@ -1,3 +1,4 @@
3 = <gawk>, 2 = <test>, 1 = <this>
a b c a BB c a b c
a b CC a b CC a b CC
+DON'T PANIC
diff --git a/test/getlnhd.awk b/test/getlnhd.awk
new file mode 100644
index 00000000..f0f801b2
--- /dev/null
+++ b/test/getlnhd.awk
@@ -0,0 +1,10 @@
+BEGIN { pipe = "cat <<EOF\n"
+ pipe = pipe "select * from user\n"
+ pipe = pipe " where Name = 'O\\'Donell'\n"
+ pipe = pipe "EOF\n"
+
+ while ((pipe | getline) > 0)
+ print
+
+ exit 0
+}
diff --git a/test/getlnhd.ok b/test/getlnhd.ok
new file mode 100644
index 00000000..d8cb4530
--- /dev/null
+++ b/test/getlnhd.ok
@@ -0,0 +1,2 @@
+select * from user
+ where Name = 'O\'Donell'
diff --git a/test/gsubasgn.awk b/test/gsubasgn.awk
new file mode 100644
index 00000000..f0b77012
--- /dev/null
+++ b/test/gsubasgn.awk
@@ -0,0 +1,13 @@
+# tests for assigning to a function within that function
+
+#1 - should be bad
+function test1 (r) { gsub(r, "x", test1) }
+BEGIN { test1("") }
+
+#2 - should be bad
+function test2 () { gsub(/a/, "x", test2) }
+BEGIN { test2() }
+
+#3 - should be ok
+function test3 (r) { gsub(/a/, "x", r) }
+BEGIN { test3("") }
diff --git a/test/gsubasgn.ok b/test/gsubasgn.ok
new file mode 100644
index 00000000..dfa6fbc7
--- /dev/null
+++ b/test/gsubasgn.ok
@@ -0,0 +1,4 @@
+gawk: gsubasgn.awk:4: function test1 (r) { gsub(r, "x", test1) }
+gawk: gsubasgn.awk:4: ^ gsub third parameter is not a changeable object
+gawk: gsubasgn.awk:8: function test2 () { gsub(/a/, "x", test2) }
+gawk: gsubasgn.awk:8: ^ gsub third parameter is not a changeable object
diff --git a/test/gsubtest.awk b/test/gsubtest.awk
new file mode 100644
index 00000000..31374795
--- /dev/null
+++ b/test/gsubtest.awk
@@ -0,0 +1,8 @@
+BEGIN {
+ str = "abc"; gsub("b+", "FOO", str); print str
+ str = "abc"; gsub("x*", "X", str); print str
+ str = "abc"; gsub("b*", "X", str); print str
+ str = "abc"; gsub("c", "X", str); print str
+ str = "abc"; gsub("c+", "X", str); print str
+ str = "abc"; gsub("x*$", "X", str); print str
+}
diff --git a/test/gsubtest.ok b/test/gsubtest.ok
new file mode 100644
index 00000000..191bebda
--- /dev/null
+++ b/test/gsubtest.ok
@@ -0,0 +1,6 @@
+aFOOc
+XaXbXcX
+XaXcX
+abX
+abX
+abcX
diff --git a/test/mmap8k.in b/test/mmap8k.in
new file mode 100644
index 00000000..0500ddf2
--- /dev/null
+++ b/test/mmap8k.in
@@ -0,0 +1,143 @@
+XXXXXXXX.com ALTERNET 9305 930528 1500.00 startup
+XXXXXXXX.com ALTERNET 9305 930624 94.38 Line-9305
+XXXXXXXX.com ALTERNET 9306 930624 104.49 Line-9306
+XXXXXXXX.com ALTERNET 9306 930624 649.16 Line-install
+XXXXXXXX.com ALTERNET 9306 930624 166.67 TCP-slip
+XXXXXXXX.com ALTERNET 9307 930624 104.49 Line-9307
+XXXXXXXX.com ALTERNET 9307 930624 250.00 TCP-slip
+XXXXXXXX.com ALTERNET 9308 930701 250.00 TCP-slip
+XXXXXXXX.com ALTERNET 9308 930701 104.49 line-9308
+XXXXXXXX.com PAYMENT 9307 930731 1500.00 1870
+XXXXXXXX.com ALTERNET 9309 930801 250.00 TCP-slip
+XXXXXXXX.com ALTERNET 9309 930801 104.49 line-9309
+XXXXXXXX.com INTEREST 9307 930801 22.50
+XXXXXXXX.com CREDADJ 9308 930805 22.50 waive interest
+XXXXXXXX.com PAYMENT 9308 930820 1723.68 1982
+XXXXXXXX.com ALTERNET 9310 930901 250.00 TCP-slip
+XXXXXXXX.com ALTERNET 9310 930901 104.49 line-9310
+XXXXXXXX.com PAYMENT 9310 931001 708.98 2313
+XXXXXXXX.com ALTERNET 9311 931001 250.00 TCP-slip
+XXXXXXXX.com ALTERNET 9311 931001 104.49 line-9311
+XXXXXXXX.com INTEREST 9309 931001 5.32
+XXXXXXXX.com CREDADJ 9310 931007 5.32 waive int-9309
+XXXXXXXX.com ALTERNET 9312 931101 250.00 TCP-slip
+XXXXXXXX.com ALTERNET 9312 931101 104.49 line-9312
+XXXXXXXX.com PAYMENT 9311 931120 354.49 002701
+XXXXXXXX.com ALTERNET 9401 931201 250.00 TCP-slip
+XXXXXXXX.com ALTERNET 9401 931201 104.49 line-9401
+XXXXXXXX.com PAYMENT 9312 931218 354.49 2884
+XXXXXXXX.com ALTERNET 9402 940101 250.00 TCP-slip
+XXXXXXXX.com ALTERNET 9402 940101 104.49 line-9402
+XXXXXXXX.com INTEREST 9312 940101 5.32
+XXXXXXXX.com PAYMENT 9401 940122 354.49 3084
+XXXXXXXX.com ALTERNET 9403 940201 250.00 TCP-slip
+XXXXXXXX.com ALTERNET 9403 940201 104.49 line-9403
+XXXXXXXX.com INTEREST 9401 940201 5.40
+XXXXXXXX.com PAYMENT 9402 940207 354.49 3140
+XXXXXXXX.com CREDADJ 9402 940211 5.32 interest-9402
+XXXXXXXX.com CREDADJ 9402 940211 5.40 interest-9403
+XXXXXXXX.com ALTERNET 9404 940301 250.00 TCP-slip
+XXXXXXXX.com ALTERNET 9404 940301 104.49 line-9404
+XXXXXXXX.com INTEREST 9402 940301 5.32
+XXXXXXXX.com PAYMENT 9403 940310 354.49 003307
+XXXXXXXX.com PAYMENT 9403 940324 354.49 3446
+XXXXXXXX.com ALTERNET 9405 940401 250.00 TCP-slip
+XXXXXXXX.com ALTERNET 9405 940401 104.49 line-9405
+XXXXXXXX.com ALTERNET 9406 940501 250.00 TCP-slip
+XXXXXXXX.com ALTERNET 9406 940501 104.49 line-9406
+XXXXXXXX.com INTEREST 9404 940501 5.40
+XXXXXXXX.com PAYMENT 9405 940509 359.81 003819
+XXXXXXXX.com ALTERNET 9407 940601 250.00 TCP-slip
+XXXXXXXX.com ALTERNET 9407 940601 104.49 line-9407
+XXXXXXXX.com INTEREST 9405 940601 5.40
+XXXXXXXX.com PAYMENT 9406 940603 354.49 004025
+XXXXXXXX.com ALTERNET 9408 940701 250.00 TCP-slip
+XXXXXXXX.com ALTERNET 9408 940701 104.49 line-9408
+XXXXXXXX.com INTEREST 9406 940701 5.48
+XXXXXXXX.com PAYMENT 9407 940725 354.49 004350
+XXXXXXXX.com ALTERNET 9409 940801 250.00 TCP-slip
+XXXXXXXX.com ALTERNET 9409 940801 104.49 line-9409
+XXXXXXXX.com INTEREST 9407 940801 5.56
+XXXXXXXX.com PAYMENT 9408 940808 354.49 004454
+XXXXXXXX.com ALTERNET 9409 940811 0.00 startup
+XXXXXXXX.com EQUIPMENT 9408 940831 399.00 ATL6402-1
+XXXXXXXX.com EQUIPMENT 9408 940831 2295.00 NBClassicPac-1
+XXXXXXXX.com EQUIPMENT 9408 940831 1060.00 Syn35-1+ship
+XXXXXXXX.com ALTERNET 9410 940901 250.00 TCP-slip
+XXXXXXXX.com ALTERNET 9410 940901 104.49 line-9410
+XXXXXXXX.com INTEREST 9408 940901 5.64
+XXXXXXXX.com PAYMENT 9409 940906 354.49 004677
+XXXXXXXX.com CREDADJ 9409 940921 124.95 TCP-slip-9409
+XXXXXXXX.com CREDADJ 9409 940921 52.20 line-9409
+XXXXXXXX.com CREDADJ 9410 940921 250.00 TCP-slip-9410
+XXXXXXXX.com CREDADJ 9410 940921 104.49 line-9410
+XXXXXXXX.com ALTERNET 9409 940921 397.50 TCP-56k-local recon
+XXXXXXXX.com ALTERNET 9409 940921 87.45 line-9409 recon
+XXXXXXXX.com ALTERNET 9410 940921 795.00 TCP-56k-local recon
+XXXXXXXX.com ALTERNET 9410 940921 174.90 line-9410 recon
+XXXXXXXX.com ALTERNET 9411 941001 795.00 TCP-56k-local
+XXXXXXXX.com ALTERNET 9411 941001 174.90 line-9411
+XXXXXXXX.com INTEREST 9409 941001 54.06
+XXXXXXXX.com PAYMENT 9410 941017 354.49 5026
+XXXXXXXX.com ALTERNET 9412 941101 795.00 TCP-56k-local
+XXXXXXXX.com ALTERNET 9412 941101 174.90 line-9412
+XXXXXXXX.com INTEREST 9410 941101 85.93
+XXXXXXXX.com PAYMENT 9411 941114 969.90 005274
+XXXXXXXX.com ALTERNET 9501 941201 795.00 TCP-56k-local
+XXXXXXXX.com ALTERNET 9501 941201 174.90 line-9501
+XXXXXXXX.com INTEREST 9411 941201 87.22
+XXXXXXXX.com PAYMENT 9412 941219 4723.90 5590
+XXXXXXXX.com ALTERNET 9502 950101 795.00 TCP-56k-local
+XXXXXXXX.com ALTERNET 9502 950101 174.90 line-9502
+XXXXXXXX.com INTEREST 9412 950101 32.22
+XXXXXXXX.com PAYMENT 9501 950103 1893.11 5766
+XXXXXXXX.com ALTERNET 9503 950201 795.00 TCP-56k-local-old
+XXXXXXXX.com ALTERNET 9503 950201 174.90 line-9503
+XXXXXXXX.com INTEREST 9501 950201 18.85
+XXXXXXXX.com PAYMENT 9502 950207 969.90 6044
+XXXXXXXX.com ALTERNET 9504 950301 795.00 TCP-56k-local-old
+XXXXXXXX.com ALTERNET 9504 950301 174.90 line-9504
+XXXXXXXX.com INTEREST 9502 950301 19.13
+XXXXXXXX.com PAYMENT 9503 950307 969.90 6408
+XXXXXXXX.com ALTERNET 9504 950316 3000.00 startup TCP-bt1-128k%5
+XXXXXXXX.com PAYMENT 9503 950327 969.90 6594
+XXXXXXXX.com ALTERNET 9505 950401 1187.50 TCP-bt1-128k%5.00
+XXXXXXXX.com ALTERNET 9505 950401 556.60 line-9505
+XXXXXXXX.com EQUIPMENT 9504 950410 1595.00 cisco2501-1
+XXXXXXXX.com CREDADJ 9504 950417 503.50 TCP-56k-local
+XXXXXXXX.com CREDADJ 9504 950417 116.60 line-9504
+XXXXXXXX.com ALTERNET 9504 950417 448.80 line-install
+XXXXXXXX.com ALTERNET 9504 950417 752.02 TCP-bt1-128k%5 recon
+XXXXXXXX.com ALTERNET 9504 950417 371.00 line-9504 recon
+XXXXXXXX.com PAYMENT 9504 950424 3000.00 6841
+XXXXXXXX.com ALTERNET 9506 950501 1187.50 TCP-bt1-128k%5.00
+XXXXXXXX.com ALTERNET 9506 950501 556.60 line-9506
+XXXXXXXX.com PAYMENT 9505 950505 2049.86 6985
+XXXXXXXX.com PAYMENT 9505 950531 3924.22 7179
+XXXXXXXX.com ALTERNET 9507 950601 1187.50 TCP-bt1-128k%5.00
+XXXXXXXX.com ALTERNET 9507 950601 556.60 line-9507
+XXXXXXXX.com PAYMENT 9506 950607 1744.10 7232
+XXXXXXXX.com ALTERNET 9508 950701 1187.50 TCP-bt1-128k%5.00
+XXXXXXXX.com ALTERNET 9508 950701 556.60 line-9508
+XXXXXXXX.com PAYMENT 9507 950705 1744.10 7641
+XXXXXXXX.com ALTERNET 9509 950801 1187.50 TCP-bt1-128k%5.00
+XXXXXXXX.com ALTERNET 9509 950801 556.60 line-9509
+XXXXXXXX.com PAYMENT 9508 950803 1744.10 7914
+XXXXXXXX.com ALTERNET 9510 950901 1187.50 TCP-bt1-128k%5.00
+XXXXXXXX.com ALTERNET 9510 950901 556.60 line-9510
+XXXXXXXX.com PAYMENT 9509 950905 1744.10 8203
+XXXXXXXX.com ALTERNET 9511 951001 1187.50 TCP-bt1-128k%5.00
+XXXXXXXX.com ALTERNET 9511 951001 556.60 line-9511
+XXXXXXXX.com PAYMENT 9510 951003 1744.10 8508
+XXXXXXXX.com ALTERNET 9512 951101 1187.50 TCP-bt1-128k%5.00
+XXXXXXXX.com ALTERNET 9512 951101 556.60 line-9512
+XXXXXXXX.com PAYMENT 9511 951103 2129.83 8837
+XXXXXXXX.com ALTERNET 9601 951201 1187.50 TCP-bt1-128k%5.00
+XXXXXXXX.com ALTERNET 9601 951201 556.60 line-9601
+XXXXXXXX.com PAYMENT 9512 951204 2129.83 9131
+XXXXXXXX.com ALTERNET 9602 960101 1187.50 TCP-bt1-128k%5.00
+XXXXXXXX.com ALTERNET 9602 960101 556.60 line-9602
+XXXXXXXX.com PAYMENT 9601 960103 1744.10 9456
+XXXXXXXX.com ALTERNET 9603 960201 1187.50 TCP-bt1-128k%5.00
+XXXXXXXX.com ALTERNET 9603 960201 556.60 line-9603
+XXXXXXXX.com PAYMENT 9602 960205 1358.37 9834
diff --git a/test/nlfldsep.ok b/test/nlfldsep.ok
new file mode 100644
index 00000000..66849161
--- /dev/null
+++ b/test/nlfldsep.ok
@@ -0,0 +1,13 @@
+4
+some
+stuff
+more
+stuff
+
+2
+junk
+stuff
+
+1
+final
+
diff --git a/test/nlfldsep.sh b/test/nlfldsep.sh
new file mode 100755
index 00000000..0a0a5f53
--- /dev/null
+++ b/test/nlfldsep.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+AWK=${AWK-../gawk}
+
+echo 'some stuff
+more stuffA
+junk
+stuffA
+final' | $AWK 'BEGIN { RS = "A" }
+{print NF; for (i = 1; i <= NF; i++) print $i ; print ""}'
+
diff --git a/test/prt1eval.awk b/test/prt1eval.awk
new file mode 100644
index 00000000..4ecd3680
--- /dev/null
+++ b/test/prt1eval.awk
@@ -0,0 +1,6 @@
+function tst () {
+ sum += 1
+ return sum
+}
+
+BEGIN { OFMT = "%.0f" ; print tst() }
diff --git a/test/prt1eval.ok b/test/prt1eval.ok
new file mode 100644
index 00000000..d00491fd
--- /dev/null
+++ b/test/prt1eval.ok
@@ -0,0 +1 @@
+1
diff --git a/test/prtoeval.awk b/test/prtoeval.awk
new file mode 100644
index 00000000..77880d87
--- /dev/null
+++ b/test/prtoeval.awk
@@ -0,0 +1,4 @@
+function returns_a_str() { print "<in function>" ; return "'A STRING'" }
+BEGIN {
+ print "partial line:", returns_a_str()
+}
diff --git a/test/prtoeval.ok b/test/prtoeval.ok
new file mode 100644
index 00000000..13e122b8
--- /dev/null
+++ b/test/prtoeval.ok
@@ -0,0 +1,2 @@
+<in function>
+partial line: 'A STRING'
diff --git a/test/rand.awk b/test/rand.awk
index 08f9894e..6378f3d3 100644
--- a/test/rand.awk
+++ b/test/rand.awk
@@ -1,5 +1,5 @@
BEGIN {
- srand()
+ srand(2)
for (i = 0; i < 19; i++)
printf "%3d ", (1 + int(100 * rand()))
print ""
diff --git a/test/rand.ok b/test/rand.ok
new file mode 100644
index 00000000..b6d75545
--- /dev/null
+++ b/test/rand.ok
@@ -0,0 +1 @@
+ 27 17 86 27 22 53 61 11 33 48 51 97 99 35 20 27 62 100 32
diff --git a/test/reindops.awk b/test/reindops.awk
new file mode 100644
index 00000000..13ae6576
--- /dev/null
+++ b/test/reindops.awk
@@ -0,0 +1,6 @@
+{
+ if ($1 !~ /^+[2-9]/)
+ print "gawk is broken"
+ else
+ print "gawk is ok"
+}
diff --git a/test/reindops.in b/test/reindops.in
new file mode 100644
index 00000000..b1e54353
--- /dev/null
+++ b/test/reindops.in
@@ -0,0 +1 @@
++44 123 456
diff --git a/test/reindops.ok b/test/reindops.ok
new file mode 100644
index 00000000..f9605fd3
--- /dev/null
+++ b/test/reindops.ok
@@ -0,0 +1 @@
+gawk is ok
diff --git a/test/splitvar.awk b/test/splitvar.awk
new file mode 100644
index 00000000..9e1ac790
--- /dev/null
+++ b/test/splitvar.awk
@@ -0,0 +1,5 @@
+{
+ sep = "=+"
+ n = split($0, a, sep)
+ print n
+}
diff --git a/test/splitvar.in b/test/splitvar.in
new file mode 100644
index 00000000..85be8ee5
--- /dev/null
+++ b/test/splitvar.in
@@ -0,0 +1 @@
+Here===Is=Some=====Data
diff --git a/test/splitvar.ok b/test/splitvar.ok
new file mode 100644
index 00000000..b8626c4c
--- /dev/null
+++ b/test/splitvar.ok
@@ -0,0 +1 @@
+4
diff --git a/test/splitwht.awk b/test/splitwht.awk
new file mode 100644
index 00000000..6163d72e
--- /dev/null
+++ b/test/splitwht.awk
@@ -0,0 +1,7 @@
+BEGIN {
+ str = "a b\t\tc d"
+ n = split(str, a, " ")
+ print n
+ m = split(str, b, / /)
+ print m
+}
diff --git a/test/splitwht.ok b/test/splitwht.ok
new file mode 100644
index 00000000..61c83cba
--- /dev/null
+++ b/test/splitwht.ok
@@ -0,0 +1,2 @@
+4
+5
diff --git a/test/sprintfc.awk b/test/sprintfc.awk
new file mode 100644
index 00000000..ee1e5a7c
--- /dev/null
+++ b/test/sprintfc.awk
@@ -0,0 +1 @@
+{ print sprintf("%c", $1), $1 }
diff --git a/test/sprintfc.in b/test/sprintfc.in
new file mode 100644
index 00000000..4602d28d
--- /dev/null
+++ b/test/sprintfc.in
@@ -0,0 +1,3 @@
+65
+66
+foo
diff --git a/test/sprintfc.ok b/test/sprintfc.ok
new file mode 100644
index 00000000..33769a82
--- /dev/null
+++ b/test/sprintfc.ok
@@ -0,0 +1,3 @@
+A 65
+B 66
+f foo
diff --git a/test/strftime.ok b/test/strftime.ok
deleted file mode 100644
index 52715bb9..00000000
--- a/test/strftime.ok
+++ /dev/null
@@ -1 +0,0 @@
-Thu Jan 11 09:35:20 EST 1996
diff --git a/test/substr.awk b/test/substr.awk
new file mode 100644
index 00000000..f330402c
--- /dev/null
+++ b/test/substr.awk
@@ -0,0 +1,5 @@
+BEGIN {
+ x = "A"
+ printf("%-39s\n", substr(x,1,39))
+ exit (0)
+}
diff --git a/test/substr.ok b/test/substr.ok
new file mode 100644
index 00000000..5f9debb1
--- /dev/null
+++ b/test/substr.ok
@@ -0,0 +1 @@
+A
diff --git a/test/tradanch.awk b/test/tradanch.awk
new file mode 100644
index 00000000..0cd45d17
--- /dev/null
+++ b/test/tradanch.awk
@@ -0,0 +1,2 @@
+/foo^bar/
+/foo$bar/
diff --git a/test/tradanch.in b/test/tradanch.in
new file mode 100644
index 00000000..e5c8a094
--- /dev/null
+++ b/test/tradanch.in
@@ -0,0 +1,2 @@
+foo^bar
+foo$bar
diff --git a/test/tradanch.ok b/test/tradanch.ok
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/tradanch.ok
diff --git a/test/tweakfld.awk b/test/tweakfld.awk
new file mode 100644
index 00000000..e7b538f6
--- /dev/null
+++ b/test/tweakfld.awk
@@ -0,0 +1,296 @@
+# To: bug-gnu-utils@prep.ai.mit.edu
+# Cc: arnold@gnu.ai.mit.edu
+# Date: Mon, 20 Nov 1995 11:39:29 -0500
+# From: "R. Hank Donnelly" <emory!head-cfa.harvard.edu!donnelly>
+#
+# Operating system: Linux1.2.13 (Slackware distrib)
+# GAWK version: 2.15 (?)
+# compiler: GCC (?)
+#
+# The following enclosed script does not want to fully process the input data
+# file. It correctly executes the operations on the first record, and then dies
+# on the second one. My true data file is much longer but this is
+# representative and it does fail on a file even as short as this one.
+# The failure appears to occur in the declared function add2output. Between the
+# steps of incrementing NF by one and setting $NF to the passed variable
+# the passed variable appears to vanish (i.e. NF does go from 68 to 69
+# and before incrementing it "variable" equals what it should but after
+# "variable" has no value at all.)
+#
+# The scripts have been developed using nawk on a Sun (where they run fine)
+# I have tried gawk there but get a different crash which I have not yet traced
+# down. Ideally I would like to keep the script the same so that it would run
+# on either gawk or nawk (that way I can step back and forth between laptop and
+# workstation.
+#
+# Any ideas why the laptop installation is having problems?
+# Hank
+#
+#
+# #!/usr/bin/gawk -f
+
+BEGIN {
+ # set a few values
+ FS = "\t"
+ OFS = "\t"
+ pi = atan2(0, -1)
+# distance from HRMA to focal plane in mm
+ fullradius = 10260.54
+
+ # set locations of parameters on input line
+ nf_nrg = 1
+ nf_order = 3
+ nf_item = 4
+ nf_suite = 5
+ nf_grating = 8
+ nf_shutter = 9
+ nf_type = 13
+ nf_src = 14
+ nf_target = 15
+ nf_voltage = 16
+ nf_flux = 17
+ nf_filt1 = 20
+ nf_filt1_th = 21
+ nf_filt2 = 22
+ nf_filt2_th = 23
+ nf_bnd = 24
+ nf_hrma_polar = 27
+ nf_hrma_az = 28
+ nf_detector = 30
+ nf_acis_read = 32
+ nf_acis_proc = 33
+ nf_acis_frame = 34
+ nf_hxda_aplist = 36
+ nf_hxda_y_range = 37
+ nf_hxda_z_range = 38
+ nf_hxda_y_step = 39
+ nf_hxda_z_step = 40
+ nf_sim_z = 41
+ nf_fam_polar = 43
+ nf_fam_az = 44
+ nf_fam_dither_type = 45
+ nf_mono_init = 51
+ nf_mono_range = 52
+ nf_mono_step = 53
+ nf_defocus = 54
+ nf_acis_temp = 55
+ nf_tight = 59
+ nf_offset_y = 64
+ nf_offset_z = 65
+
+ while( getline < "xrcf_mnemonics.dat" > 0 ) {
+ mnemonic[$1] = $2
+ }
+
+# "date" | getline date_line
+# ADR: use a fixed date so that testing will work
+ date_line = "Sun Mar 10 23:00:27 EST 1996"
+ split(date_line, in_date, " ")
+ out_date = in_date[2] " " in_date[3] ", " in_date[6]
+}
+
+function add2output( variable ) {
+#print("hi1") >> "debug"
+ NF++
+#print("hi2") >> "debug"
+ $NF = variable
+#print("hi3") >> "debug"
+}
+
+function error( ekey, message ) {
+ print "Error at input line " NR ", anode " ekey >> "errors.cleanup"
+ print " " message "." >> "errors.cleanup"
+}
+
+function hxda_na() {
+ $nf_hxda_aplist = $nf_hxda_y_range = $nf_hxda_z_range = "N/A"
+ $nf_hxda_y_step = $nf_hxda_z_step = "N/A"
+}
+
+function acis_na() {
+ $nf_acis_read = $nf_acis_proc = $nf_acis_frame = $nf_acis_temp = "N/A"
+}
+
+function hrc_na() {
+# print ("hi") >> "debug"
+}
+
+function fpsi_na() {
+ acis_na()
+ hrc_na()
+ $nf_sim_z = $nf_fam_polar = $nf_fam_az = $nf_fam_dither_type = "N/A"
+}
+
+function mono_na() {
+ $nf_mono_init = $nf_mono_range = $nf_mono_step = "N/A"
+}
+
+# this gives the pitch and yaw of the HRMA and FAM
+# positive pitch is facing the source "looking down"
+# positive yaw is looking left
+# 0 az is north 90 is up
+# this also adds in the FAM X,Y,Z positions
+
+function polaz2yawpitch(polar, az) {
+ theta = az * pi / 180
+ phi = polar * pi / 180 / 60
+
+
+ if( polar == 0 ) {
+ add2output( 0 )
+ add2output( 0 )
+ } else {
+ if(az == 0 || az == 180)
+ add2output( 0 )
+ else
+ add2output( - polar * sin(theta) )
+
+
+# x = cos (phi)
+# y = sin (phi) * cos (theta)
+# add2output( atan2(y,x)*180 / pi * 60 )
+
+ if(az == 90 || az ==270 )
+ add2output( 0 )
+ else
+ add2output( - polar * cos(theta) )
+
+ }
+# x = cos (phi)
+# z= sin (phi) * sin (theta)
+# add2output( atan2(z,x)*180 / pi * 60 )
+
+ if(config !~ /HXDA/) {
+# negative values of defocus move us farther from the source thus
+# increasing radius
+ radius = fullradius - defocus
+
+# FAM_x; FAM_y; FAM_z
+ if((offset_y == 0) && (offset_z == 0)){
+ add2output( fullradius - radius * cos (phi) )
+
+ if (az == 90 || az ==270)
+ add2output( 0 )
+ else
+ add2output( radius * sin (phi) * cos (theta) )
+
+ if (az == 0 || az == 180)
+ add2output( 0 )
+ else
+ add2output( - radius * sin (phi) * sin (theta) )
+ } else {
+# ******* THIS SEGMENT OF CODE IS NOT MATHEMATICALLY CORRECT FOR ****
+# OFF AXIS ANGLES AND IS SUPPLIED AS A WORKAROUND SINCE IT WILL
+# PROBABLY ONLY BE USED ON AXIS.
+ add2output( defocus )
+ add2output( offset_y )
+ add2output( offset_z )
+ }
+
+ } else {
+ add2output( "N/A" )
+ add2output( "N/A" )
+ add2output( "N/A" )
+ }
+}
+
+# set TIGHT/LOOSE to N/A if it is not one of the two allowed values
+function tight_na() {
+ if( $nf_tight !~ /TIGHT|LOOSE/ ) {
+ $nf_tight == "N/A"
+ }
+}
+
+# this entry is used to give certain entries names
+{
+ type = $nf_type
+ item = $nf_item
+ suite = $nf_suite
+ order = $nf_order
+ detector = $nf_detector
+ grating = $nf_grating
+ offset_y= $nf_offset_y
+ offset_z= $nf_offset_z
+ bnd = $nf_bnd
+ defocus = $nf_defocus
+}
+
+{
+ # make configuration parameter
+ # as well as setting configuration-dependent N/A values
+
+ if( $nf_bnd ~ "SCAN" ) {
+ # BND is scanning beam
+ config = "BND"
+ hxda_na()
+ fpsi_na()
+ } else {
+ if( grating == "NONE" ) {
+ config = "HRMA"
+ } else {
+ if( grating == "HETG" ) {
+ if( order != "Both" ) {
+ $nf_shutter = order substr($nf_shutter, \
+ index($nf_shutter, ",") )
+ }
+ } else {
+ order = "N/A"
+ }
+ config = "HRMA/" grating
+ }
+
+ if( detector ~ /ACIS|HRC/ ) {
+ detsys = detector
+ nsub = sub("-", ",", detsys)
+ config = config "/" detsys
+ hxda_na()
+ } else {
+ config = config "/HXDA"
+ fpsi_na()
+ if( detector == "HSI" ) {
+ hxda_na()
+ }
+ }
+ }
+
+ add2output( config )
+
+ if( $nf_src ~ /EIPS|Penning/ ) mono_na()
+
+ if( $nf_src == "Penning" ) $nf_voltage = "N/A"
+
+ itm = sprintf("%03d", item)
+
+ if(config in mnemonic) {
+ if( type in mnemonic ) {
+ ID = mnemonic[config] "-" mnemonic[type] "-" suite "." itm
+ add2output( ID )
+ } else {
+ error(type, "measurement type not in list")
+ }
+ } else {
+ error(config, "measurement configuration not in list")
+ }
+
+ # add date to output line
+ add2output( out_date )
+
+ # Convert HRMA polar and azimuthal angles to yaw and pitch
+ polaz2yawpitch($nf_hrma_polar, $nf_hrma_az)
+
+ # set TIGHT/LOOSE to N/A if it is not one of the two allowed values
+ tight_na()
+
+ # compute number of HXDA apertures
+ if( config ~ /HXDA/ && $nf_hxda_aplist != "N/A")
+ add2output( split( $nf_hxda_aplist, dummy, "," ) )
+ else
+ add2output( "N/A" )
+
+ # make sure the BND value is properly set
+ if($nf_bnd == "FIXED" && detector ~ /ACIS/)
+ $nf_bnd =bnd"-SYNC"
+ else
+ $nf_bnd = bnd"-FREE"
+ print
+}
diff --git a/test/tweakfld.in b/test/tweakfld.in
new file mode 100644
index 00000000..e27a9dde
--- /dev/null
+++ b/test/tweakfld.in
@@ -0,0 +1,3 @@
+0.277 N/A N/A 1 1 ASC/Hank Donnelly N/A NONE ALL,ALL N/A N/A N/A Count Rate Linearity EIPS C-Ka 1.108 0.13484 N/A N/A C8H8 10.32 C8H8 20.64 FIXED 1000 NO 0 0 0 HRC,I 1000 N/A N/A N/A N/A N/A N/A N/A N/A N/A 0 N/A APT APT LISSAJOUS 44.7175 44.7175 1 N/A N/A N/A N/A N/A 0 N/A HRCCTRTLIN 0 N/A N/A N/A 10 N/A 180 0 0 N/A N/A FPSI rate
+1.486 N/A N/A 2 1 ASC/Hank Donnelly N/A NONE ALL,ALL N/A N/A N/A Count Rate Linearity EIPS Al-Ka 4.458 0.642119 N/A N/A Al 18.38 Al 36.76 FIXED 1000 NO 0 0 0 HRC,I 1000 N/A N/A N/A N/A N/A N/A N/A N/A N/A 0 N/A APT APT LISSAJOUS 5.55556 5.55556 1 N/A N/A N/A N/A N/A 0 N/A HRCCTRTLIN 0 N/A N/A N/A 10 N/A 180 0 0 N/A N/A FPSI rate
+4.51 N/A N/A 3 1 ASC/Hank Donnelly N/A NONE ALL,ALL N/A N/A N/A Count Rate Linearity EIPS Ti-Ka 22.55 3.02894 N/A N/A Ti 40.6 N/A N/A FIXED 1000 NO 0 0 0 HRC,I 1000 N/A N/A N/A N/A N/A N/A N/A N/A N/A 0 N/A APT APT LISSAJOUS 5.55556 5.55556 1 N/A N/A N/A N/A N/A 0 N/A HRCCTRTLIN 0 N/A N/A N/A 10 N/A 180 0 0 N/A N/A FPSI rate
diff --git a/test/tweakfld.ok b/test/tweakfld.ok
new file mode 100644
index 00000000..3c4d8947
--- /dev/null
+++ b/test/tweakfld.ok
@@ -0,0 +1,3 @@
+0.277 N/A N/A 1 1 ASC/Hank Donnelly N/A NONE ALL,ALL N/A N/A N/A Count Rate Linearity EIPS C-Ka 1.108 0.13484 N/A N/A C8H8 10.32 C8H8 20.64 FIXED-FREE 1000 NO 0 0 0 HRC,I 1000 N/A N/A N/A N/A N/A N/A N/A N/A N/A 0 N/A APT APT LISSAJOUS 44.7175 44.7175 1 N/A N/A N/A N/A N/A 0 N/A HRCCTRTLIN 0 N/A N/A N/A 10 N/A 180 0 0 N/A N/A FPSI rate HRMA/HRC,I Mar 10, 1996 0 0 0 0 0 N/A
+1.486 N/A N/A 2 1 ASC/Hank Donnelly N/A NONE ALL,ALL N/A N/A N/A Count Rate Linearity EIPS Al-Ka 4.458 0.642119 N/A N/A Al 18.38 Al 36.76 FIXED-FREE 1000 NO 0 0 0 HRC,I 1000 N/A N/A N/A N/A N/A N/A N/A N/A N/A 0 N/A APT APT LISSAJOUS 5.55556 5.55556 1 N/A N/A N/A N/A N/A 0 N/A HRCCTRTLIN 0 N/A N/A N/A 10 N/A 180 0 0 N/A N/A FPSI rate HRMA/HRC,I Mar 10, 1996 0 0 0 0 0 N/A
+4.51 N/A N/A 3 1 ASC/Hank Donnelly N/A NONE ALL,ALL N/A N/A N/A Count Rate Linearity EIPS Ti-Ka 22.55 3.02894 N/A N/A Ti 40.6 N/A N/A FIXED-FREE 1000 NO 0 0 0 HRC,I 1000 N/A N/A N/A N/A N/A N/A N/A N/A N/A 0 N/A APT APT LISSAJOUS 5.55556 5.55556 1 N/A N/A N/A N/A N/A 0 N/A HRCCTRTLIN 0 N/A N/A N/A 10 N/A 180 0 0 N/A N/A FPSI rate HRMA/HRC,I Mar 10, 1996 0 0 0 0 0 N/A