aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog48
-rw-r--r--test/Makefile.am22
-rw-r--r--test/Makefile.in42
-rw-r--r--test/Maketests20
-rw-r--r--[-rwxr-xr-x]test/charasbytes.awk0
-rw-r--r--test/fpat4.awk105
-rw-r--r--test/fpat4.ok65
-rw-r--r--test/mpfrmemok1.awk7
-rw-r--r--test/mpfrmemok1.ok7
-rw-r--r--test/nonfatal1.awk6
-rw-r--r--test/nonfatal1.ok2
-rw-r--r--test/nonfatal2.awk5
-rw-r--r--test/nonfatal2.ok1
-rw-r--r--test/nonfatal3.awk6
-rw-r--r--test/nonfatal3.ok1
-rw-r--r--[-rwxr-xr-x]test/ofs1.awk0
-rw-r--r--[-rwxr-xr-x]test/range1.awk0
-rw-r--r--[-rwxr-xr-x]test/sortglos.awk0
-rw-r--r--[-rwxr-xr-x]test/sortglos.in0
19 files changed, 331 insertions, 6 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 4cd06f03..5d9ba8d0 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,5 +1,43 @@
+2015-03-17 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (mpfrmemok1): New test.
+ * mpfrmemok1.awk, mpfrmemok1.ok: New files.
+
+2015-03-10 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (fpat4): New test.
+ * fpat4.awk, fpat4.ok: New files.
+
+2015-03-08 Arnold D. Robbins <arnold@skeeve.com>
+
+ * nonfatal3.awk, nonfatal3.ok: Adjust for portability.
+ Thanks to Hermann Peifer for the report.
+
+2015-03-06 Arnold D. Robbins <arnold@skeeve.com>
+
+ * charasbytes.awk, ofs1.awk, range1.awk, sortglos.awk,
+ sortglos.in: Remove execute permission.
+
+2015-03-02 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * nonfatal1.awk: Do not print ERRNO, since the value appears to be
+ platform-dependent. Instead, print (ERRNO != "").
+ * nonfatal1.ok: Update.
+
+2015-02-28 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * Makefile.am (EXTRA_DIST): Add nonfatal3.{awk,ok}.
+ (GAWK_EXT_TESTS): Add nonfatal3.
+ * nonfatal1.awk: Replace "ti10/357" with "local:host/25", since
+ "local:host" should be a universally bad hostname due to the
+ invalid ":" character.
+ * nonfatal1.ok: Update.
+ * nonfatal3.{awk,ok}: New test for connecting to a TCP port where
+ nobody is listening.
+
2015-02-27 Arnold D. Robbins <arnold@skeeve.com>
+ * nonfatal1.ok: Update after code changes.
* id.ok: Updated after code change.
2015-02-26 Arnold D. Robbins <arnold@skeeve.com>
@@ -17,6 +55,16 @@
* Makefile.am (profile0): New test.
* profile0.awk, profile0.in, profile0.ok: New files.
+2015-02-08 Arnold D. Robbins <arnold@skeeve.com>
+
+ * nonfatal1.awk, nonfatal2.awk: String is now "NONFATAL".
+
+2015-02-06 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (nonfatal1, nonfatal2): New tests.
+ * nonfatal1.awk, nonfatal1.ok: New files.
+ * nonfatal2.awk, nonfatal2.ok: New files.
+
2015-02-01 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (paramasfunc1, paramasfunc2): Now need --posix.
diff --git a/test/Makefile.am b/test/Makefile.am
index e752865a..d2cd0ddd 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -285,6 +285,8 @@ EXTRA_DIST = \
fpat3.awk \
fpat3.in \
fpat3.ok \
+ fpat4.awk \
+ fpat4.ok \
fpatnull.awk \
fpatnull.in \
fpatnull.ok \
@@ -535,6 +537,8 @@ EXTRA_DIST = \
mpfrexprange.ok \
mpfrieee.awk \
mpfrieee.ok \
+ mpfrmemok1.awk \
+ mpfrmemok1.ok \
mpfrnegzero.awk \
mpfrnegzero.ok \
mpfrnr.awk \
@@ -599,6 +603,12 @@ EXTRA_DIST = \
nondec.ok \
nondec2.awk \
nondec2.ok \
+ nonfatal1.awk \
+ nonfatal1.ok \
+ nonfatal2.awk \
+ nonfatal2.ok \
+ nonfatal3.awk \
+ nonfatal3.ok \
nonl.awk \
nonl.ok \
noparms.awk \
@@ -1038,7 +1048,7 @@ GAWK_EXT_TESTS = \
aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \
backw badargs beginfile1 beginfile2 binmode1 charasbytes \
colonwarn clos1way crlf dbugeval delsub devfd devfd1 devfd2 dumpvars exit \
- fieldwdth fpat1 fpat2 fpat3 fpatnull fsfwfs funlen \
+ fieldwdth fpat1 fpat2 fpat3 fpat4 fpatnull fsfwfs funlen \
functab1 functab2 functab3 fwtest fwtest2 fwtest3 \
genpot gensub gensub2 getlndir gnuops2 gnuops3 gnureops \
icasefs icasers id igncdym igncfs ignrcas2 ignrcase \
@@ -1047,6 +1057,7 @@ GAWK_EXT_TESTS = \
lint lintold lintwarn \
manyfiles match1 match2 match3 mbstr1 \
nastyparm next nondec nondec2 \
+ nonfatal1 nonfatal2 nonfatal3 \
patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 printhuge procinfs \
profile0 profile1 profile2 profile3 profile4 profile5 profile6 profile7 \
profile8 pty1 \
@@ -1062,8 +1073,8 @@ INET_TESTS = inetdayu inetdayt inetechu inetecht
MACHINE_TESTS = double1 double2 fmtspcl intformat
-MPFR_TESTS = mpfrnr mpfrnegzero mpfrrem mpfrrnd mpfrieee mpfrexprange \
- mpfrsort mpfrsqrt mpfrbigint
+MPFR_TESTS = mpfrnr mpfrnegzero mpfrmemok1 mpfrrem mpfrrnd mpfrieee \
+ mpfrexprange mpfrsort mpfrsqrt mpfrbigint
LOCALE_CHARSET_TESTS = \
asort asorti backbigs1 backsmalls1 backsmalls2 \
@@ -1819,6 +1830,11 @@ mpfrrem:
@$(AWK) -M -f "$(srcdir)"/$@.awk > _$@ 2>&1
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+mpfrmemok1:
+ @echo $@
+ @$(AWK) -p/dev/stdout -M -f "$(srcdir)"/$@.awk 2>&1 | sed 1d > _$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
jarebug::
@echo $@
@"$(srcdir)"/$@.sh "$(AWKPROG)" "$(srcdir)"/$@.awk "$(srcdir)"/$@.in "_$@"
diff --git a/test/Makefile.in b/test/Makefile.in
index 0c00973c..cf8093b8 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -542,6 +542,8 @@ EXTRA_DIST = \
fpat3.awk \
fpat3.in \
fpat3.ok \
+ fpat4.awk \
+ fpat4.ok \
fpatnull.awk \
fpatnull.in \
fpatnull.ok \
@@ -792,6 +794,8 @@ EXTRA_DIST = \
mpfrexprange.ok \
mpfrieee.awk \
mpfrieee.ok \
+ mpfrmemok1.awk \
+ mpfrmemok1.ok \
mpfrnegzero.awk \
mpfrnegzero.ok \
mpfrnr.awk \
@@ -856,6 +860,12 @@ EXTRA_DIST = \
nondec.ok \
nondec2.awk \
nondec2.ok \
+ nonfatal1.awk \
+ nonfatal1.ok \
+ nonfatal2.awk \
+ nonfatal2.ok \
+ nonfatal3.awk \
+ nonfatal3.ok \
nonl.awk \
nonl.ok \
noparms.awk \
@@ -1294,7 +1304,7 @@ GAWK_EXT_TESTS = \
aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \
backw badargs beginfile1 beginfile2 binmode1 charasbytes \
colonwarn clos1way crlf dbugeval delsub devfd devfd1 devfd2 dumpvars exit \
- fieldwdth fpat1 fpat2 fpat3 fpatnull fsfwfs funlen \
+ fieldwdth fpat1 fpat2 fpat3 fpat4 fpatnull fsfwfs funlen \
functab1 functab2 functab3 fwtest fwtest2 fwtest3 \
genpot gensub gensub2 getlndir gnuops2 gnuops3 gnureops \
icasefs icasers id igncdym igncfs ignrcas2 ignrcase \
@@ -1303,6 +1313,7 @@ GAWK_EXT_TESTS = \
lint lintold lintwarn \
manyfiles match1 match2 match3 mbstr1 \
nastyparm next nondec nondec2 \
+ nonfatal1 nonfatal2 nonfatal3 \
patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 printhuge procinfs \
profile0 profile1 profile2 profile3 profile4 profile5 profile6 profile7 \
profile8 pty1 \
@@ -1315,8 +1326,8 @@ GAWK_EXT_TESTS = \
EXTRA_TESTS = inftest regtest
INET_TESTS = inetdayu inetdayt inetechu inetecht
MACHINE_TESTS = double1 double2 fmtspcl intformat
-MPFR_TESTS = mpfrnr mpfrnegzero mpfrrem mpfrrnd mpfrieee mpfrexprange \
- mpfrsort mpfrsqrt mpfrbigint
+MPFR_TESTS = mpfrnr mpfrnegzero mpfrmemok1 mpfrrem mpfrrnd mpfrieee \
+ mpfrexprange mpfrsort mpfrsqrt mpfrbigint
LOCALE_CHARSET_TESTS = \
asort asorti backbigs1 backsmalls1 backsmalls2 \
@@ -2256,6 +2267,11 @@ mpfrrem:
@$(AWK) -M -f "$(srcdir)"/$@.awk > _$@ 2>&1
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+mpfrmemok1:
+ @echo $@
+ @$(AWK) -p/dev/stdout -M -f "$(srcdir)"/$@.awk 2>&1 | sed 1d > _$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
jarebug::
@echo $@
@"$(srcdir)"/$@.sh "$(AWKPROG)" "$(srcdir)"/$@.awk "$(srcdir)"/$@.in "_$@"
@@ -3476,6 +3492,11 @@ fpat3:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+fpat4:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
fpatnull:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -3636,6 +3657,21 @@ nondec:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+nonfatal1:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
+nonfatal2:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
+nonfatal3:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
patsplit:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index adf95cc5..5011fb1f 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -992,6 +992,11 @@ fpat3:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+fpat4:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
fpatnull:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -1152,6 +1157,21 @@ nondec:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+nonfatal1:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
+nonfatal2:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
+nonfatal3:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
patsplit:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/charasbytes.awk b/test/charasbytes.awk
index feb195c8..feb195c8 100755..100644
--- a/test/charasbytes.awk
+++ b/test/charasbytes.awk
diff --git a/test/fpat4.awk b/test/fpat4.awk
new file mode 100644
index 00000000..79cd6a7f
--- /dev/null
+++ b/test/fpat4.awk
@@ -0,0 +1,105 @@
+BEGIN {
+ false = 0
+ true = 1
+
+ fpat[1] = "([^,]*)|(\"[^\"]+\")"
+ fpat[2] = fpat[1]
+ fpat[3] = fpat[1]
+ fpat[4] = "aa+"
+ fpat[5] = fpat[4]
+ fpat[6] = "[a-z]"
+
+ data[1] = "Robbins,,Arnold,"
+ data[2] = "Smith,,\"1234 A Pretty Place, NE\",Sometown,NY,12345-6789,USA"
+ data[3] = "Robbins,Arnold,\"1234 A Pretty Place, NE\",Sometown,NY,12345-6789,USA"
+ data[4] = "bbbaaacccdddaaaaaqqqq"
+ data[5] = "bbbaaacccdddaaaaaqqqqa" # should get trailing qqqa
+ data[6] = "aAbBcC"
+
+ for (i = 1; i in data; i++) {
+ printf("Splitting: <%s>\n", data[i])
+ n = mypatsplit(data[i], fields, fpat[i], seps)
+ m = patsplit(data[i], fields2, fpat[i], seps2)
+ print "n =", n, "m =", m
+ if (n != m) {
+ printf("ERROR: counts wrong!\n") > "/dev/stderr"
+ exit 1
+ }
+ for (j = 1; j <= n; j++) {
+ printf("fields[%d] = <%s>\tfields2[%d] = <%s>\n", j, fields[j], j, fields2[j])
+ if (fields[j] != fields2[j]) {
+ printf("ERROR: data %d, field %d mismatch!\n", i, j) > "/dev/stderr"
+ exit 1
+ }
+ }
+ for (j = 0; j in seps; j++) {
+ printf("seps[%d] = <%s>\tseps2[%d] = <%s>\n", j, seps[j], j, seps2[j])
+ if (seps[j] != seps2[j]) {
+ printf("ERROR: data %d, separator %d mismatch!\n", i, j) > "/dev/stderr"
+ exit 1
+ }
+ }
+ }
+}
+
+function mypatsplit(string, array, pattern, seps,
+ eosflag, non_empty, nf) # locals
+{
+ delete array
+ delete seps
+ if (length(string) == 0)
+ return 0
+
+ eosflag = non_empty = false
+ nf = 0
+ while (match(string, pattern)) {
+ if (RLENGTH > 0) { # easy case
+ non_empty = true
+ if (! (nf in seps)) {
+ if (RSTART == 1) # match at front of string
+ seps[nf] = ""
+ else
+ seps[nf] = substr(string, 1, RSTART - 1)
+ }
+ array[++nf] = substr(string, RSTART, RLENGTH)
+ string = substr(string, RSTART+RLENGTH)
+ if (length(string) == 0)
+ break
+ } else if (non_empty) {
+ # last match was non-empty, and at the
+ # current character we get a zero length match,
+ # which we don't want, so skip over it
+ non_empty = false
+ seps[nf] = substr(string, 1, 1)
+ string = substr(string, 2)
+ } else {
+ # 0 length match
+ if (! (nf in seps)) {
+ if (RSTART == 1)
+ seps[nf] = ""
+ else
+ seps[nf] = substr(string, 1, RSTART - 1)
+ }
+ array[++nf] = ""
+ if (! non_empty && ! eosflag) { # prev was empty
+ seps[nf] = substr(string, 1, 1)
+ }
+ if (RSTART == 1) {
+ string = substr(string, 2)
+ } else {
+ string = substr(string, RSTART + 1)
+ }
+ non_empty = false
+ }
+ if (length(string) == 0) {
+ if (eosflag)
+ break
+ else
+ eosflag = true
+ }
+ }
+ if (length(string) > 0)
+ seps[nf] = string
+
+ return length(array)
+}
diff --git a/test/fpat4.ok b/test/fpat4.ok
new file mode 100644
index 00000000..b4430aba
--- /dev/null
+++ b/test/fpat4.ok
@@ -0,0 +1,65 @@
+Splitting: <Robbins,,Arnold,>
+n = 4 m = 4
+fields[1] = <Robbins> fields2[1] = <Robbins>
+fields[2] = <> fields2[2] = <>
+fields[3] = <Arnold> fields2[3] = <Arnold>
+fields[4] = <> fields2[4] = <>
+seps[0] = <> seps2[0] = <>
+seps[1] = <,> seps2[1] = <,>
+seps[2] = <,> seps2[2] = <,>
+seps[3] = <,> seps2[3] = <,>
+Splitting: <Smith,,"1234 A Pretty Place, NE",Sometown,NY,12345-6789,USA>
+n = 7 m = 7
+fields[1] = <Smith> fields2[1] = <Smith>
+fields[2] = <> fields2[2] = <>
+fields[3] = <"1234 A Pretty Place, NE"> fields2[3] = <"1234 A Pretty Place, NE">
+fields[4] = <Sometown> fields2[4] = <Sometown>
+fields[5] = <NY> fields2[5] = <NY>
+fields[6] = <12345-6789> fields2[6] = <12345-6789>
+fields[7] = <USA> fields2[7] = <USA>
+seps[0] = <> seps2[0] = <>
+seps[1] = <,> seps2[1] = <,>
+seps[2] = <,> seps2[2] = <,>
+seps[3] = <,> seps2[3] = <,>
+seps[4] = <,> seps2[4] = <,>
+seps[5] = <,> seps2[5] = <,>
+seps[6] = <,> seps2[6] = <,>
+Splitting: <Robbins,Arnold,"1234 A Pretty Place, NE",Sometown,NY,12345-6789,USA>
+n = 7 m = 7
+fields[1] = <Robbins> fields2[1] = <Robbins>
+fields[2] = <Arnold> fields2[2] = <Arnold>
+fields[3] = <"1234 A Pretty Place, NE"> fields2[3] = <"1234 A Pretty Place, NE">
+fields[4] = <Sometown> fields2[4] = <Sometown>
+fields[5] = <NY> fields2[5] = <NY>
+fields[6] = <12345-6789> fields2[6] = <12345-6789>
+fields[7] = <USA> fields2[7] = <USA>
+seps[0] = <> seps2[0] = <>
+seps[1] = <,> seps2[1] = <,>
+seps[2] = <,> seps2[2] = <,>
+seps[3] = <,> seps2[3] = <,>
+seps[4] = <,> seps2[4] = <,>
+seps[5] = <,> seps2[5] = <,>
+seps[6] = <,> seps2[6] = <,>
+Splitting: <bbbaaacccdddaaaaaqqqq>
+n = 2 m = 2
+fields[1] = <aaa> fields2[1] = <aaa>
+fields[2] = <aaaaa> fields2[2] = <aaaaa>
+seps[0] = <bbb> seps2[0] = <bbb>
+seps[1] = <cccddd> seps2[1] = <cccddd>
+seps[2] = <qqqq> seps2[2] = <qqqq>
+Splitting: <bbbaaacccdddaaaaaqqqqa>
+n = 2 m = 2
+fields[1] = <aaa> fields2[1] = <aaa>
+fields[2] = <aaaaa> fields2[2] = <aaaaa>
+seps[0] = <bbb> seps2[0] = <bbb>
+seps[1] = <cccddd> seps2[1] = <cccddd>
+seps[2] = <qqqqa> seps2[2] = <qqqqa>
+Splitting: <aAbBcC>
+n = 3 m = 3
+fields[1] = <a> fields2[1] = <a>
+fields[2] = <b> fields2[2] = <b>
+fields[3] = <c> fields2[3] = <c>
+seps[0] = <> seps2[0] = <>
+seps[1] = <A> seps2[1] = <A>
+seps[2] = <B> seps2[2] = <B>
+seps[3] = <C> seps2[3] = <C>
diff --git a/test/mpfrmemok1.awk b/test/mpfrmemok1.awk
new file mode 100644
index 00000000..9331a34d
--- /dev/null
+++ b/test/mpfrmemok1.awk
@@ -0,0 +1,7 @@
+# This program tests that -M works with profiling.
+# It does not do anything real, but there should not be glibc memory
+# errors and it should be valgrind-clean too.
+
+BEGIN {
+ v = 0x0100000000000000000000000000000000
+}
diff --git a/test/mpfrmemok1.ok b/test/mpfrmemok1.ok
new file mode 100644
index 00000000..2389a2d5
--- /dev/null
+++ b/test/mpfrmemok1.ok
@@ -0,0 +1,7 @@
+
+ # BEGIN rule(s)
+
+ BEGIN {
+ 1 v = 340282366920938463463374607431768211456
+ }
+
diff --git a/test/nonfatal1.awk b/test/nonfatal1.awk
new file mode 100644
index 00000000..a9228f3a
--- /dev/null
+++ b/test/nonfatal1.awk
@@ -0,0 +1,6 @@
+BEGIN {
+ PROCINFO["NONFATAL"]
+ # note that ":" is not a valid hostname character
+ print |& "/inet/tcp/0/local:host/25"
+ print (ERRNO != "")
+}
diff --git a/test/nonfatal1.ok b/test/nonfatal1.ok
new file mode 100644
index 00000000..51583f2c
--- /dev/null
+++ b/test/nonfatal1.ok
@@ -0,0 +1,2 @@
+gawk: nonfatal1.awk:4: warning: remote host and port information (local:host, 25) invalid
+1
diff --git a/test/nonfatal2.awk b/test/nonfatal2.awk
new file mode 100644
index 00000000..fedbba43
--- /dev/null
+++ b/test/nonfatal2.awk
@@ -0,0 +1,5 @@
+BEGIN {
+ PROCINFO["NONFATAL"] = 1
+ print > "/dev/no/such/file"
+ print ERRNO
+}
diff --git a/test/nonfatal2.ok b/test/nonfatal2.ok
new file mode 100644
index 00000000..ddc88691
--- /dev/null
+++ b/test/nonfatal2.ok
@@ -0,0 +1 @@
+No such file or directory
diff --git a/test/nonfatal3.awk b/test/nonfatal3.awk
new file mode 100644
index 00000000..b2a4ec9e
--- /dev/null
+++ b/test/nonfatal3.awk
@@ -0,0 +1,6 @@
+BEGIN {
+ PROCINFO["NONFATAL"]
+ # valid host but bogus port
+ print |& "/inet/tcp/0/localhost/0"
+ print ERRNO != ""
+}
diff --git a/test/nonfatal3.ok b/test/nonfatal3.ok
new file mode 100644
index 00000000..d00491fd
--- /dev/null
+++ b/test/nonfatal3.ok
@@ -0,0 +1 @@
+1
diff --git a/test/ofs1.awk b/test/ofs1.awk
index 83b3c2a5..83b3c2a5 100755..100644
--- a/test/ofs1.awk
+++ b/test/ofs1.awk
diff --git a/test/range1.awk b/test/range1.awk
index aca5db50..aca5db50 100755..100644
--- a/test/range1.awk
+++ b/test/range1.awk
diff --git a/test/sortglos.awk b/test/sortglos.awk
index e4f910d7..e4f910d7 100755..100644
--- a/test/sortglos.awk
+++ b/test/sortglos.awk
diff --git a/test/sortglos.in b/test/sortglos.in
index b24373de..b24373de 100755..100644
--- a/test/sortglos.in
+++ b/test/sortglos.in