X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=test%2Fmhmail%2Ftest-mhmail;h=c11e1938c1d17c9b2b846fccf6b480f3c4d8688c;hb=0f0af4e32a4d734209c16282b63f7cb1094e2699;hp=fdb361758136a5a44bd1c5031d5c77d538075eb3;hpb=bb8db313c1deea588b83a44a86e653d3cfcac9c1;p=mmh diff --git a/test/mhmail/test-mhmail b/test/mhmail/test-mhmail index fdb3617..c11e193 100755 --- a/test/mhmail/test-mhmail +++ b/test/mhmail/test-mhmail @@ -18,8 +18,7 @@ fi # $1 is expected output file, provided by caller # $2 is mhmail switches, except for -body # $3 of -b signifies use -body switch, | signifies provide body on stdin -# $4 contains message body. When using stdin, can contain printf(1) format -# specifiers. +# $4 contains the message body. test_mhmail () { "${MH_OBJ_DIR}/test/fakesmtp" "$actual" $localport & @@ -30,7 +29,7 @@ test_mhmail () status=1 for i in 0 1 2 3 4 5 6 7 8 9; do if [ $3 = '|' ]; then - if printf "$4" | mhmail recipient@example.com $2 \ + if printf '%s' "$4" | mhmail recipient@example.com $2 \ -server 127.0.0.1 -port $localport; then status=0 break @@ -98,8 +97,8 @@ check $expected $actual # Verified same behavior as compiled mhmail. case `mhmail -v` in mhmail\ --*) ;; - * ) echo "$0: mhmail -v generated unexpected output" 1>&2 - failed=`expr ${failed:-0} + 1`;; + * ) printf '%s: mhmail -v generated unexpected output\n' "$0" >&2 + failed=`expr ${failed:-0} + 1`;; esac # check for missing argument to switches that require them @@ -121,7 +120,7 @@ done # That will just run inc, which we don't want to do anything, # so tell inc to just display its version. # Verified same behavior as compiled mhmail. -printf "inc: -version\n" >> $MH +printf 'inc: -version\n' >> $MH case `mhmail` in inc\ --*) ;; * ) echo "$0: mhmail generated unexpected output" 1>&2 @@ -287,7 +286,7 @@ test_mhmail "$expected" '-from sender@localhost -subject Test' '|' message # 2) use send(1) by added a send switch to the profile and # verifying that it gets used. # Not supported by compiled mhmail. -printf "send: -msgid\n" >> $MH +printf 'send: -msgid\n' >> $MH cat > "$expected" <