aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2017-09-14 08:18:09 -0400
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2017-09-14 08:43:19 -0400
commit4b6c3509f6eb3a947606d220b3e33dd995a934c4 (patch)
treea83a51f19b740f251b74d3fbf3937f78696fc331 /test
parent45b363502f438604737f19b639f7dc1433a022f2 (diff)
downloadegawk-4b6c3509f6eb3a947606d220b3e33dd995a934c4.tar.gz
egawk-4b6c3509f6eb3a947606d220b3e33dd995a934c4.tar.bz2
egawk-4b6c3509f6eb3a947606d220b3e33dd995a934c4.zip
Fix nonfatal1 test by ignoring the platform-specific portion of the error message.
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog7
-rw-r--r--test/Makefile.am5
-rw-r--r--test/Makefile.in10
-rw-r--r--test/Maketests5
-rw-r--r--test/nonfatal1.ok2
5 files changed, 18 insertions, 11 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 29b4181a..16708f48 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,10 @@
+2017-09-14 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * Makefile.am (nonfatal1): New rule with postprocessing to remove
+ the platform-specific portion of the error message.
+ * nonfatal1.ok: Remove the platform-specific portion of the error
+ message.
+
2017-09-12 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (readdir): Add to message that test can fail on
diff --git a/test/Makefile.am b/test/Makefile.am
index 7976fcda..1ef33b13 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -2424,6 +2424,11 @@ sourcesplit:
@AWKPATH="$(srcdir)" $(AWK) --source='BEGIN { a = 5;' --source='print a }' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+nonfatal1:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk 2>&1 | $(AWK) '{print gensub(/invalid:.*$$/, "invalid", 1, $$0)}' >_$@ || 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 abb3b341..bf91f16b 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -2861,6 +2861,11 @@ sourcesplit:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) --source='BEGIN { a = 5;' --source='print a }' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
+nonfatal1:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk 2>&1 | $(AWK) '{print gensub(/invalid:.*$$/, "invalid", 1, $$0)}' >_$@ || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
Gt-dummy:
# file Maketests, generated from Makefile.am by the Gentests program
addcomma:
@@ -4245,11 +4250,6 @@ 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: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index e6a2f300..8ae3f973 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -1382,11 +1382,6 @@ 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: $$? >>_$@
diff --git a/test/nonfatal1.ok b/test/nonfatal1.ok
index 4c9ab576..51583f2c 100644
--- a/test/nonfatal1.ok
+++ b/test/nonfatal1.ok
@@ -1,2 +1,2 @@
-gawk: nonfatal1.awk:4: warning: remote host and port information (local:host, 25) invalid: Name or service not known
+gawk: nonfatal1.awk:4: warning: remote host and port information (local:host, 25) invalid
1