aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2012-04-07 23:54:39 -0400
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2012-04-07 23:54:39 -0400
commitd6ee0f78f05caa4136cbc713fab64a0308f0da5d (patch)
tree4f35d281fb596ef41e9c25e00cc751a9e03f6101
parentbc9ed3fd239984429613095e6cfc142092f036c4 (diff)
downloadegawk-d6ee0f78f05caa4136cbc713fab64a0308f0da5d.tar.gz
egawk-d6ee0f78f05caa4136cbc713fab64a0308f0da5d.tar.bz2
egawk-d6ee0f78f05caa4136cbc713fab64a0308f0da5d.zip
Fix shared library tests to work properly with make diffout.
-rw-r--r--test/ChangeLog6
-rw-r--r--test/Makefile.am8
-rw-r--r--test/ordchr2.ok1
3 files changed, 11 insertions, 4 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 5993ca23..4d4d5557 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,5 +1,11 @@
2012-04-07 Andrew J. Schorr <aschorr@telemetry-investments.com>
+ * Makefile.am (ordchr2, readfile): Fix so "make diffout" will work
+ properly.
+ * orchr2.ok: New file.
+
+2012-04-07 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
* Makefile.am (check): Add new shlib-tests target.
(SHLIB_TESTS): Add tests ordchr, ordchr2, fork, fork2, readfile and
filefuncs.
diff --git a/test/Makefile.am b/test/Makefile.am
index 854a8f7c..4ed867d4 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1465,13 +1465,13 @@ rri1::
ordchr2::
@echo $@
- @$(AWK) -l ordchr 'BEGIN {print chr(ord("A"))}' >_$@ 2>&1
- @-$(CMP) $(srcdir)/ordchr.ok _$@ && rm -f _$@
+ @$(AWK) -l ordchr 'BEGIN {print chr(ord("z"))}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
readfile::
@echo $@
- @$(AWK) -l readfile 'BEGIN {printf "%s", readfile("Makefile")}' 2>&1 \
- | $(CMP) Makefile -
+ @$(AWK) -l readfile 'BEGIN {printf "%s", readfile("Makefile")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) Makefile _$@ && rm -f _$@ || cp -p Makefile $@.ok
# Targets generated for other tests:
include Maketests
diff --git a/test/ordchr2.ok b/test/ordchr2.ok
new file mode 100644
index 00000000..b6802534
--- /dev/null
+++ b/test/ordchr2.ok
@@ -0,0 +1 @@
+z