X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/587e977a97865f091131355f6dd250ece99f7adb..66bf17b229b5bd066e5cdc919cc6d41f086a7ed2:/test/post/test-messageid?ds=inline diff --git a/test/post/test-messageid b/test/post/test-messageid index 45f75d0c..6ca8f97e 100755 --- a/test/post/test-messageid +++ b/test/post/test-messageid @@ -32,6 +32,8 @@ DATA From: Mr Nobody To: Somebody Else Subject: Test +MIME-Version: 1.0 +Content-Type: text/plain; charset="us-ascii" Date: This is a test @@ -47,7 +49,7 @@ send: message not delivered to anyone" #### Rely on sendmail/pipe below to override default mts. mts_fakesendmail="${MHMTSCONF}-fakesendmail" cp "${MHMTSCONF}" "$mts_fakesendmail" -printf "%s\n" "sendmail: ${srcdir}/test/fakesendmail" >>"$mts_fakesendmail" +printf 'sendmail: %s/test/fakesendmail\n' "$srcdir" >>"$mts_fakesendmail" MHMTSCONF="$mts_fakesendmail" # $1: -messageid switch selection @@ -55,7 +57,7 @@ MHMTSCONF="$mts_fakesendmail" test_messageid () { msgid_style="$1" - send -draft -mts sendmail/pipe -msgid -messageid "$msgid_style" + run_prog send -draft -mts sendmail/pipe -msgid -messageid "$msgid_style" shift # fakesendmail drops the message and any cc's into this mbox. @@ -77,15 +79,15 @@ test_messageid () # e.g., Message-ID: <5364-1342884222.165897@ldYM.FXwU.bBqK> id='^Message-ID: <[0-9]\{1,\}-[0-9]\{1,\}\.[0-9]\{6,6\}@[-_0-9A-Za-z]\{4,4\}\.[-_0-9A-Za-z]\{4,4\}\.[-_0-9A-Za-z]\{4,4\}' ;; - *) printf "$0: unexpected messageid: $msgid_style"; exit 1;; + *) printf '%s: unexpected messageid: %s\n' "$0" "$msgid_style"; exit 1 ;; esac if grep "$id" "$cur" >/dev/null; then : else mv "$cur" "${testname}.actual" - printf "$0: unexpected "$msgid_style" Message-ID format, \ -see ${testname}.actual\n" + printf '%s: unexpected %s Message-ID format, see %s\n' "$0" \ + "$msgid_style" "${testname}.actual" exit 1 fi @@ -122,6 +124,8 @@ cat > "${testname}.expected" < To: Somebody Else Subject: Test +MIME-Version: 1.0 +Content-Type: text/plain; charset="us-ascii" Date: Message-ID: @@ -145,6 +149,8 @@ cat > "${testname}.expected" < To: Somebody Else Subject: Test +MIME-Version: 1.0 +Content-Type: text/plain; charset="us-ascii" Date: Message-ID: