From a0d46629f9114a740cf6971a1487de9528ec9cf3 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 18 Jan 2018 17:54:15 +0200 Subject: Improve pty2 test. --- test/ChangeLog | 7 +++++++ test/Makefile.am | 4 ++-- test/Makefile.in | 2 +- test/pty2.ok | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/test/ChangeLog b/test/ChangeLog index ec8e42c9..04e7f121 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,10 @@ +2018-01-18 Arnold D. Robbins + + * Makefile.am (pty2): Instead of sed, use simpler awk goop + to canonicalize the output from od. Thanks to Michal + Jaegermann for the tip. + * pty2.ok: Updated. + 2018-01-17 Arnold D. Robbins * Makefile.am (charset-tests-all): Add punctuation in the message. diff --git a/test/Makefile.am b/test/Makefile.am index 80900466..1ef52600 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -2416,13 +2416,13 @@ pty1: $(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ;; \ esac -## 1/2018: The sed goop is to compensate for different output of od on +## 1/2018: The awk 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 | sed -e 's/0 */0 /' -e 's/ *$$//' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ; \ + *) AWKPATH="$(srcdir)" $(AWK) -f $@.awk | od -c | $(AWK) '{ $$1 = $$1 ; print }' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ; \ $(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ;; \ esac diff --git a/test/Makefile.in b/test/Makefile.in index 13fe1c3d..aa0d7655 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 | sed -e 's/0 */0 /' -e 's/ *$$//' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ; \ + *) AWKPATH="$(srcdir)" $(AWK) -f $@.awk | od -c | $(AWK) '{ $$1 = $$1 ; print }' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ; \ $(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ;; \ esac diff --git a/test/pty2.ok b/test/pty2.ok index fb0f6221..0c8afd98 100644 --- a/test/pty2.ok +++ b/test/pty2.ok @@ -1,2 +1,2 @@ -0000000 a b c d \n +0000000 a b c d \n 0000005 -- cgit v1.2.3