X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=test%2Fpost%2Ftest-messageid;h=fbed212963ec7e7f5ba48279e71e7f1198fcf3ac;hb=a59946091a8ee121ad89708efb0b719e0d1e179a;hp=b072cacaa976cdbd8b4eda45d856ac790d3245ab;hpb=9f8f8b1e1d553774865f2c177191c359c3dc652c;p=mmh diff --git a/test/post/test-messageid b/test/post/test-messageid index b072cac..fbed212 100755 --- a/test/post/test-messageid +++ b/test/post/test-messageid @@ -47,7 +47,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 @@ -68,25 +68,24 @@ test_messageid () cur=`mhpath cur` # Verify that Message-ID is of the right form. We'll see how # portable these grep regular expressions are. - case "$msgid_style" in + case $msgid_style in localname) # e.g., Message-ID: <5348.1342884222@localhost.localdomain> id='^Message-ID: <[0-9]\{1,\}\.[0-9]\{1,\}@' ;; random) - # e.g., Message-ID: <5364-1342884222.165897@ldYMFXwUbBqKcZwg> - id=\ -'^Message-ID: <[0-9]\{1,\}-[0-9]\{1,\}\.[0-9]\{6,6\}@[+/0-9A-Za-z]\{16,16\}' + # 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