]> diplodocus.org Git - nmh/commitdiff
Fixed test-mhfixmsg by using octal instead of hex bytes with
authorDavid Levine <levinedl@acm.org>
Thu, 22 Sep 2016 18:08:10 +0000 (14:08 -0400)
committerDavid Levine <levinedl@acm.org>
Thu, 22 Sep 2016 18:08:10 +0000 (14:08 -0400)
printf(1).

test/README
test/mhfixmsg/test-mhfixmsg

index 1932cd7..e9dae92 100644 (file)
@@ -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.
index 95f6fa1..81d4796 100755 (executable)
@@ -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` <<EOF
 To: recipient@example.com
@@ -719,7 +719,7 @@ check `mhpath last` "$expected"
 
 # check -decodetext of binary (containing ASCII NUL) text
 start_test "-decodetext of binary (containing ASCII NUL) text"
-printf "%s\xbd\xb2=\xbc\x00%s" "To: recipient@example.com
+printf "%s\275\262=\274\000%s" "To: recipient@example.com
 From: sender@example.com
 Subject: mhfixmsg binary decode test
 MIME-Version: 1.0
@@ -832,7 +832,7 @@ Content-Transfer-Encoding: 8bit
 EOF
 
 #### Generated the encoded text below with:
-####   $ printf '\xbd\xb2=\xbc\n' | base64
+####   $ printf '\275\262=\274\n' | base64
 cat >`mhpath new` <<EOF
 To: recipient@example.com
 From: sender@example.com