diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2018-01-17 21:33:22 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2018-01-17 21:33:22 +0200 |
commit | 980c1fb130eb4df4fab4bd08ae782fadaa39ebcd (patch) | |
tree | 3f0091c63d04dff27841907a0eccd8466bfb6f0d | |
parent | 8c26b0480d3f83416e6791a0453e3548e139a00f (diff) | |
download | egawk-980c1fb130eb4df4fab4bd08ae782fadaa39ebcd.tar.gz egawk-980c1fb130eb4df4fab4bd08ae782fadaa39ebcd.tar.bz2 egawk-980c1fb130eb4df4fab4bd08ae782fadaa39ebcd.zip |
Fix pty2 test for Mac OS X.
-rw-r--r-- | test/ChangeLog | 3 | ||||
-rw-r--r-- | test/Makefile.am | 4 | ||||
-rw-r--r-- | test/Makefile.in | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index abff2dd7..ec8e42c9 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -5,6 +5,9 @@ reformat the message. (isarrayunset): New test. * isarrayunset.awk, isarrayunset.ok: New files. + * pty2: Add some sed goop to canonicalize the output of od; + this works around the Mac OS X od which produces different + output, avoiding a spurious test failure. 2018-01-15 Arnold D. Robbins <arnold@skeeve.com> diff --git a/test/Makefile.am b/test/Makefile.am index 34d90782..80900466 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -2416,11 +2416,13 @@ pty1: $(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ;; \ esac +## 1/2018: The sed goop is to compensate for different output of od on +## Mac OS X systems. Sigh. pty2: @echo $@ @-case `uname` in \ *[Oo][Ss]/390*) : ;; \ - *) AWKPATH="$(srcdir)" $(AWK) -f $@.awk | od -c >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ; \ + *) AWKPATH="$(srcdir)" $(AWK) -f $@.awk | od -c | sed -e 's/0 */0 /' -e 's/ *$$//' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ; \ $(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ;; \ esac diff --git a/test/Makefile.in b/test/Makefile.in index f8b6e05d..13fe1c3d 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -2858,7 +2858,7 @@ pty2: @echo $@ @-case `uname` in \ *[Oo][Ss]/390*) : ;; \ - *) AWKPATH="$(srcdir)" $(AWK) -f $@.awk | od -c >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ; \ + *) AWKPATH="$(srcdir)" $(AWK) -f $@.awk | od -c | sed -e 's/0 */0 /' -e 's/ *$$//' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ; \ $(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ;; \ esac |