From f3cd885b4c8e5f6caf24472111ad2fd2791871f1 Mon Sep 17 00:00:00 2001 From: David Levine Date: Thu, 22 Sep 2016 14:08:10 -0400 Subject: [PATCH] Fixed test-mhfixmsg by using octal instead of hex bytes with printf(1). --- test/README | 3 +++ test/mhfixmsg/test-mhfixmsg | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/test/README b/test/README index 1932cd76..e9dae928 100644 --- a/test/README +++ b/test/README @@ -71,6 +71,9 @@ in the test scripts. In particular: - Avoid depending on the exact format of output from system (non-nmh) programs. +- Use octal instead of hex (\x) bytes in printf(1) formats, because hex + is not supported by POSIX printf. + The Heirloom Bourne Shell, http://heirloom.sourceforge.net/sh.html, catches many non-portable shell constructs, such as $(), $(()), !, and assignment in export statements. diff --git a/test/mhfixmsg/test-mhfixmsg b/test/mhfixmsg/test-mhfixmsg index 95f6fa15..81d47966 100755 --- a/test/mhfixmsg/test-mhfixmsg +++ b/test/mhfixmsg/test-mhfixmsg @@ -575,7 +575,7 @@ check "$expected" "$actual" # check attempted (default, 8 bit) -decodetext of binary text #### Generated the encoded text below with: -#### $ printf '\xbd\xb2=\xbc\x00\n' | base64 +#### $ printf '\275\262=\274\000\n' | base64 start_test "attempted (default, 8 bit) -decodetext of binary text" cat >`mhpath new` <`mhpath new` <