projects
/
mmh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
bb8db31
)
Fixed printf's in test suite.
author
David Levine
<levinedl@acm.org>
Sat, 20 Oct 2012 15:41:43 +0000
(10:41 -0500)
committer
David Levine
<levinedl@acm.org>
Sat, 20 Oct 2012 15:41:43 +0000
(10:41 -0500)
21 files changed:
test/anno/test-anno
patch
|
blob
|
history
test/common.sh.in
patch
|
blob
|
history
test/dist/test-dist
patch
|
blob
|
history
test/fakesendmail
patch
|
blob
|
history
test/folder/test-packf
patch
|
blob
|
history
test/format/test-dp
patch
|
blob
|
history
test/format/test-fmtdump
patch
|
blob
|
history
test/format/test-mymbox
patch
|
blob
|
history
test/inc/test-msgchk
patch
|
blob
|
history
test/mhbuild/test-utf8-body
patch
|
blob
|
history
test/mhmail/test-mhmail
patch
|
blob
|
history
test/post/test-messageid
patch
|
blob
|
history
test/post/test-mts
patch
|
blob
|
history
test/post/test-post-aliases
patch
|
blob
|
history
test/prompter/test-prompter
patch
|
blob
|
history
test/rcv/test-rcvdist
patch
|
blob
|
history
test/rcv/test-rcvpack
patch
|
blob
|
history
test/rcv/test-rcvstore
patch
|
blob
|
history
test/rcv/test-rcvtty
patch
|
blob
|
history
test/repl/test-repl
patch
|
blob
|
history
test/whatnow/test-cd
patch
|
blob
|
history
diff --git
a/test/anno/test-anno
b/test/anno/test-anno
index
a5a292d
..
4f00677
100755
(executable)
--- a/
test/anno/test-anno
+++ b/
test/anno/test-anno
@@
-45,7
+45,7
@@
check "$expected" "$actual"
# check -version
case `anno -v` in
anno\ --*) ;;
# check -version
case `anno -v` in
anno\ --*) ;;
- * ) printf "$0: anno -v generated unexpected output\n" >&2
+ * ) printf '%s: anno -v generated unexpected output\n' "$0" >&2
failed=`expr ${failed:-0} + 1`;;
esac
failed=`expr ${failed:-0} + 1`;;
esac
diff --git
a/test/common.sh.in
b/test/common.sh.in
index
da526de
..
a81e156
100644
(file)
--- a/
test/common.sh.in
+++ b/
test/common.sh.in
@@
-63,7
+63,7
@@
findprog()
D=.
fi
if [ -f "$D/$PROG" -a -x "$D/$PROG" ]; then
D=.
fi
if [ -f "$D/$PROG" -a -x "$D/$PROG" ]; then
- printf "$D/$PROG"
+ printf '%s\n' "$D/$PROG"
break
fi
done
break
fi
done
@@
-87,12
+87,12
@@
progress_update ()
# this automatically rounds to nearest integer
arith_eval 100 \* $PROG / $RANGE; PERC=$arith_val
# note \r so next update will overwrite
# this automatically rounds to nearest integer
arith_eval 100 \* $PROG / $RANGE; PERC=$arith_val
# note \r so next update will overwrite
- printf "%3d%%\r" $PERC
+ printf '%3d%%\r' $PERC
}
progress_done ()
{
}
progress_done ()
{
- printf "100%%\n"
+ printf '100%%\n'
}
check_for_hard_links () {
}
check_for_hard_links () {
diff --git
a/test/dist/test-dist
b/test/dist/test-dist
index
709c847
..
769406c
100755
(executable)
--- a/
test/dist/test-dist
+++ b/
test/dist/test-dist
@@
-25,13
+25,13
@@
localmbox=`${MH_LIB_DIR}/ap -format "%(localmbox)" 0`
#### Use sendmail/pipe below to override default mts.
mts_fakesendmail="${MHMTSCONF}-fakesendmail"
sed -e 's/^mts:.*/mts: sendmail\/pipe/' "${MHMTSCONF}" > "$mts_fakesendmail"
#### Use sendmail/pipe below to override default mts.
mts_fakesendmail="${MHMTSCONF}-fakesendmail"
sed -e 's/^mts:.*/mts: sendmail\/pipe/' "${MHMTSCONF}" > "$mts_fakesendmail"
-printf "sendmail: ${srcdir}/test/fakesendmail\n" >>"$mts_fakesendmail"
+printf 'sendmail: %s/test/fakesendmail\n' "$srcdir" >>"$mts_fakesendmail"
MHMTSCONF="$mts_fakesendmail"
# arguments: dist switches
test_dist ()
{
MHMTSCONF="$mts_fakesendmail"
# arguments: dist switches
test_dist ()
{
- printf "send\n" | dist "$@" >/dev/null
+ printf 'send\n' | dist "$@" >/dev/null
# fakesendmail drops the message and any cc's into this mbox.
mbox="${MH_TEST_DIR}"/Mail/fakesendmail.mbox
# fakesendmail drops the message and any cc's into this mbox.
mbox="${MH_TEST_DIR}"/Mail/fakesendmail.mbox
@@
-77,7
+77,7
@@
check "$expected" "$actual"
# check -version
case `dist -v` in
dist\ --*) ;;
# check -version
case `dist -v` in
dist\ --*) ;;
- * ) printf "$0: dist -v generated unexpected output\n" >&2
+ * ) printf '%s: dist -v generated unexpected output\n' "$0" >&2
failed=`expr ${failed:-0} + 1`;;
esac
failed=`expr ${failed:-0} + 1`;;
esac
@@
-178,7
+178,7
@@
until grep '^Resent:' "${MH_TEST_DIR}"/Mail/inbox/2 >/dev/null; do
arith_eval $i + 1
i=$arith_val
if [ $i -gt 60 ]; then
arith_eval $i + 1
i=$arith_val
if [ $i -gt 60 ]; then
- printf "$0: -annotate failed, will not wait any longer\n"
+ printf '%s: -annotate failed, will not wait any longer\n' "$0"
break
fi
done
break
fi
done
diff --git
a/test/fakesendmail
b/test/fakesendmail
index
0595a47
..
97f63b1
100755
(executable)
--- a/
test/fakesendmail
+++ b/
test/fakesendmail
@@
-10,12
+10,12
@@
##
if [ "$MH_TEST_DIR"x = x ]; then
##
if [ "$MH_TEST_DIR"x = x ]; then
- printf "$0 is intended for use only by the nmh test suite\n"
+ printf '%s is intended for use only by the nmh test suite\n' "$0"
exit 1
fi
#### Puts message on stdin in a drop that the test knows about.
exit 1
fi
#### Puts message on stdin in a drop that the test knows about.
-deliver="${MH_LIB_DIR}/rcvpack ${MH_TEST_DIR}/Mail/fakesendmail.mbox"
+deliver="$MH_LIB_DIR/rcvpack $MH_TEST_DIR/Mail/fakesendmail.mbox"
found_dasht=0
for arg in "$@"; do
found_dasht=0
for arg in "$@"; do
@@
-27,17
+27,18
@@
if [ $found_dasht -eq 0 ]; then
msg=
datamode=0
msg=
datamode=0
- printf "220 If it can't be done in Bourne shell it's not worth doing\n"
+ printf '%s\n' "220 If it can't be done in Bourne shell it's not worth doing"
while read line; do
#### Strip off carriage returns, they confuse the pattern matching.
while read line; do
#### Strip off carriage returns, they confuse the pattern matching.
- line=`printf "$line" | tr -d '\r'`
+ line=`printf %s "$line" | tr -d '\r'`
case "$line" in
case "$line" in
- DATA) printf "354 do tell\n"; datamode=1 ;;
- .) printf "250 done\n"; datamode=0; printf "$msg" | $deliver; msg= ;;
- QUIT) printf "221 byenow\n"; break ;;
+ DATA) printf '354 do tell\n'; datamode=1 ;;
+ .) printf '250 done\n'; datamode=0;
+ printf %s "$msg" | $deliver; msg= ;;
+ QUIT) printf '221 byenow\n'; break ;;
*) [ $datamode -eq 1 ] && msg="${msg}${line}
*) [ $datamode -eq 1 ] && msg="${msg}${line}
-" || printf "250 OK\n"
+" || printf '250 OK\n'
esac
done
else
esac
done
else
diff --git
a/test/folder/test-packf
b/test/folder/test-packf
index
758a2ab
..
3e0281f
100755
(executable)
--- a/
test/folder/test-packf
+++ b/
test/folder/test-packf
@@
-37,8
+37,8
@@
check "$expected" "$actual"
# check -version
case `packf -v` in
packf\ --*) ;;
# check -version
case `packf -v` in
packf\ --*) ;;
- * ) printf "$0: packf -v generated unexpected output\n" >&2
- failed=`expr ${failed:-0} + 1`;;
+ * ) printf '%s: packf -v generated unexpected output\n' "$0" >&2
+ failed=`expr ${failed:-0} + 1`;;
esac
# check unknown switch
esac
# check unknown switch
diff --git
a/test/format/test-dp
b/test/format/test-dp
index
023d579
..
b1a1995
100755
(executable)
--- a/
test/format/test-dp
+++ b/
test/format/test-dp
@@
-42,8
+42,8
@@
check "$expected" "$actual"
# check -version
case `$dp -v` in
dp\ --*) ;;
# check -version
case `$dp -v` in
dp\ --*) ;;
- * ) printf "$0: dp -v generated unexpected output\n" >&2
- failed=`expr ${failed:-0} + 1`;;
+ * ) printf '%s: dp -v generated unexpected output\n' "$0" >&2
+ failed=`expr ${failed:-0} + 1`;;
esac
# check unknown switch
esac
# check unknown switch
diff --git
a/test/format/test-fmtdump
b/test/format/test-fmtdump
index
44380ba
..
9ea7178
100755
(executable)
--- a/
test/format/test-fmtdump
+++ b/
test/format/test-fmtdump
@@
-41,7
+41,7
@@
check $expected $actual
# check -version
case `$fmtdump -v` in
fmtdump\ --*) ;;
# check -version
case `$fmtdump -v` in
fmtdump\ --*) ;;
- * ) printf "$0: fmtdump -v generated unexpected output\n" >&2
+ * ) printf '%s: fmtdump -v generated unexpected output\n' "$0" >&2
failed=`expr ${failed:-0} + 1`;;
esac
failed=`expr ${failed:-0} + 1`;;
esac
diff --git
a/test/format/test-mymbox
b/test/format/test-mymbox
index
2cc1bb6
..
040390c
100755
(executable)
--- a/
test/format/test-mymbox
+++ b/
test/format/test-mymbox
@@
-44,7
+44,7
@@
run_test "echo $output" 0 "Local-mailbox overriding user@host test"
# Add an Alternate-Mailbox. This caused ismymbox() to lose the
# Local-Mailbox, Bug #36635: -nocc me doesn't account for
# Alternate-Mailboxes.
# Add an Alternate-Mailbox. This caused ismymbox() to lose the
# Local-Mailbox, Bug #36635: -nocc me doesn't account for
# Alternate-Mailboxes.
-printf "Alternate-Mailboxes: user@example.com\n" >> $MH
+printf 'Alternate-Mailboxes: user@example.com\n' >> $MH
run_test "echo `${MH_LIB_DIR}/ap -format '%(mymbox{text})' "${myname}"`" \
1 "Local-Mailbox with Alternate-Mailbox test"
run_test "echo `${MH_LIB_DIR}/ap -format '%(mymbox{text})' "${myname}"`" \
1 "Local-Mailbox with Alternate-Mailbox test"
diff --git
a/test/inc/test-msgchk
b/test/inc/test-msgchk
index
4145230
..
c6850d9
100755
(executable)
--- a/
test/inc/test-msgchk
+++ b/
test/inc/test-msgchk
@@
-45,7
+45,7
@@
check "$expected" "$actual"
# check -version
case `msgchk -v` in
msgchk\ --*) ;;
# check -version
case `msgchk -v` in
msgchk\ --*) ;;
- * ) printf "$0: msgchk -v generated unexpected output\n" >&2
+ * ) printf '%s: msgchk -v generated unexpected output\n' "$0" >&2
failed=`expr ${failed:-0} + 1`;;
esac
failed=`expr ${failed:-0} + 1`;;
esac
diff --git
a/test/mhbuild/test-utf8-body
b/test/mhbuild/test-utf8-body
index
2998da4
..
47229de
100755
(executable)
--- a/
test/mhbuild/test-utf8-body
+++ b/
test/mhbuild/test-utf8-body
@@
-21,7
+21,7
@@
testname="${MH_TEST_DIR}/$$"
#### Rely on sendmail/pipe below to override default mts.
mts_fakesendmail="${MHMTSCONF}-fakesendmail"
cp "${MHMTSCONF}" "$mts_fakesendmail"
#### Rely on sendmail/pipe below to override default mts.
mts_fakesendmail="${MHMTSCONF}-fakesendmail"
cp "${MHMTSCONF}" "$mts_fakesendmail"
-printf "sendmail: ${srcdir}/test/fakesendmail\n" >>"$mts_fakesendmail"
+printf 'sendmail: %s/test/fakesendmail\n' "$srcdir" >>"$mts_fakesendmail"
MHMTSCONF="$mts_fakesendmail"
# argument: expected output
MHMTSCONF="$mts_fakesendmail"
# argument: expected output
diff --git
a/test/mhmail/test-mhmail
b/test/mhmail/test-mhmail
index
fdb3617
..
c11e193
100755
(executable)
--- 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
# $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 &
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
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
-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\ --*) ;;
# 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
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.
# 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
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.
# 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" <<EOF
EHLO nosuchhost.example.com
cat > "$expected" <<EOF
EHLO nosuchhost.example.com
@@
-461,7
+460,8
@@
Date:
QUIT
EOF
QUIT
EOF
-test_mhmail "$expected" '-from sender@localhost' '|' '\n'
+test_mhmail "$expected" '-from sender@localhost' '|' '
+'
[ ${failed:-0} -eq 0 ] || exit ${failed:-0}
[ ${failed:-0} -eq 0 ] || exit ${failed:-0}
@@
-483,7
+483,10
@@
Date:
QUIT
EOF
QUIT
EOF
-test_mhmail "$expected" '-from sender@localhost' '|' '\n\n\n'
+test_mhmail "$expected" '-from sender@localhost' '|' '
+
+
+'
[ ${failed:-0} -eq 0 ] || exit ${failed:-0}
[ ${failed:-0} -eq 0 ] || exit ${failed:-0}
@@
-525,7
+528,10
@@
here's some text
QUIT
EOF
QUIT
EOF
-test_mhmail "$expected" '-from sender@localhost' '|' "here's some text\n\n\n"
+test_mhmail "$expected" '-from sender@localhost' '|' "here's some text
+
+
+"
[ ${failed:-0} -eq 0 ] || exit ${failed:-0}
[ ${failed:-0} -eq 0 ] || exit ${failed:-0}
diff --git
a/test/post/test-messageid
b/test/post/test-messageid
index
45f75d0
..
fbed212
100755
(executable)
--- 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"
#### 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
MHMTSCONF="$mts_fakesendmail"
# $1: -messageid switch selection
@@
-77,15
+77,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\}'
;;
# 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"
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
exit 1
fi
diff --git
a/test/post/test-mts
b/test/post/test-mts
index
88f68c5
..
8266323
100755
(executable)
--- a/
test/post/test-mts
+++ b/
test/post/test-mts
@@
-47,7
+47,7
@@
test_post "${testname}.actual" "${testname}.expected" "-mts smtp"
#### Rely on sendmail/smtp or sendmail/pipe below to override default mts.
mts_fakesendmail="${MHMTSCONF}-fakesendmail"
cp "${MHMTSCONF}" "$mts_fakesendmail"
#### Rely on sendmail/smtp or sendmail/pipe below to override default mts.
mts_fakesendmail="${MHMTSCONF}-fakesendmail"
cp "${MHMTSCONF}" "$mts_fakesendmail"
-printf "sendmail: ${srcdir}/test/fakesendmail\n" >>"$mts_fakesendmail"
+printf 'sendmail: %s/test/fakesendmail\n' "$srcdir" >>"$mts_fakesendmail"
MHMTSCONF="$mts_fakesendmail"
# $1: -mts switch selection
MHMTSCONF="$mts_fakesendmail"
# $1: -mts switch selection
diff --git
a/test/post/test-post-aliases
b/test/post/test-post-aliases
index
6030ad1
..
ee06f28
100755
(executable)
--- a/
test/post/test-post-aliases
+++ b/
test/post/test-post-aliases
@@
-27,7
+27,7
@@
EOF
#### Rely on sendmail/smtp or sendmail/pipe below to override default mts.
mts_fakesendmail="${MHMTSCONF}-fakesendmail"
cp "${MHMTSCONF}" "$mts_fakesendmail"
#### Rely on sendmail/smtp or sendmail/pipe below to override default mts.
mts_fakesendmail="${MHMTSCONF}-fakesendmail"
cp "${MHMTSCONF}" "$mts_fakesendmail"
-printf "sendmail: ${srcdir}/test/fakesendmail\n" >>"$mts_fakesendmail"
+printf 'sendmail: %s/test/fakesendmail\n' "$srcdir" >>"$mts_fakesendmail"
MHMTSCONF="$mts_fakesendmail"
# $1: -mts switch selection
MHMTSCONF="$mts_fakesendmail"
# $1: -mts switch selection
@@
-59,14
+59,14
@@
test_alias ()
send -draft -alias "${MH_TEST_DIR}/Mail/aliases" -mts sendmail/pipe \
>"${testname}.actual" 2>&1
if [ $? -eq 0 ]; then
send -draft -alias "${MH_TEST_DIR}/Mail/aliases" -mts sendmail/pipe \
>"${testname}.actual" 2>&1
if [ $? -eq 0 ]; then
- printf "$0: sendmail/pipe should have failed but didn't\n"
+ printf '%s: sendmail/pipe should have failed but didn'"'"'t\n' "$0"
else
set -e
check "${testname}.actual" "$2"
fi
else
else
set -e
check "${testname}.actual" "$2"
fi
else
- printf "$0: invalid -mts switch selection\n"
+ printf '%s: invalid -mts switch selection\n' "$0"
exit 1
fi
}
exit 1
fi
}
diff --git
a/test/prompter/test-prompter
b/test/prompter/test-prompter
index
03f2f13
..
69eb9dd
100755
(executable)
--- a/
test/prompter/test-prompter
+++ b/
test/prompter/test-prompter
@@
-41,8
+41,8
@@
check $expected $actual
# check -version
case `prompter -v` in
prompter\ --*) ;;
# check -version
case `prompter -v` in
prompter\ --*) ;;
- * ) printf "$0: prompter -v generated unexpected output\n" >&2
- failed=`expr ${failed:-0} + 1`;;
+ * ) printf '%s: prompter -v generated unexpected output\n' "$0" >&2
+ failed=`expr ${failed:-0} + 1`;;
esac
# check unknown switch
esac
# check unknown switch
diff --git
a/test/rcv/test-rcvdist
b/test/rcv/test-rcvdist
index
e49b390
..
8dea84d
100755
(executable)
--- a/
test/rcv/test-rcvdist
+++ b/
test/rcv/test-rcvdist
@@
-38,7
+38,7
@@
check "$expected" "$actual"
# check -version
case `$rcvdist -v` in
rcvdist\ --*) ;;
# check -version
case `$rcvdist -v` in
rcvdist\ --*) ;;
- * ) printf "$0: rcvdist -v generated unexpected output\n" >&2
+ * ) printf '%s: rcvdist -v generated unexpected output\n' "$0" >&2
failed=`expr ${failed:-0} + 1`;;
esac
failed=`expr ${failed:-0} + 1`;;
esac
@@
-53,7
+53,7
@@
run_test "$rcvdist" \
#### Use sendmail/pipe below to override default mts.
mts_fakesendmail="${MHMTSCONF}-fakesendmail"
sed -e 's/^mts:.*/mts: sendmail\/pipe/' "${MHMTSCONF}" > "$mts_fakesendmail"
#### Use sendmail/pipe below to override default mts.
mts_fakesendmail="${MHMTSCONF}-fakesendmail"
sed -e 's/^mts:.*/mts: sendmail\/pipe/' "${MHMTSCONF}" > "$mts_fakesendmail"
-printf "sendmail: ${srcdir}/test/fakesendmail\n" >>"$mts_fakesendmail"
+printf 'sendmail: %s/test/fakesendmail\n' "$srcdir" >>"$mts_fakesendmail"
MHMTSCONF="$mts_fakesendmail"
# arguments: rcvdist switches
MHMTSCONF="$mts_fakesendmail"
# arguments: rcvdist switches
diff --git
a/test/rcv/test-rcvpack
b/test/rcv/test-rcvpack
index
46327b4
..
51deed7
100755
(executable)
--- a/
test/rcv/test-rcvpack
+++ b/
test/rcv/test-rcvpack
@@
-39,7
+39,7
@@
check "$expected" "$actual"
# check -version
case `$rcvpack -v` in
rcvpack\ --*) ;;
# check -version
case `$rcvpack -v` in
rcvpack\ --*) ;;
- * ) printf "$0: rcvpack -v generated unexpected output\n" >&2
+ * ) printf '%s: rcvpack -v generated unexpected output\n' "$0" >&2
failed=`expr ${failed:-0} + 1`;;
esac
failed=`expr ${failed:-0} + 1`;;
esac
diff --git
a/test/rcv/test-rcvstore
b/test/rcv/test-rcvstore
index
0493bc2
..
82d270d
100755
(executable)
--- a/
test/rcv/test-rcvstore
+++ b/
test/rcv/test-rcvstore
@@
-44,8
+44,8
@@
check $expected $actual
# check -version
case `$rcvstore -v` in
rcvstore\ --*) ;;
# check -version
case `$rcvstore -v` in
rcvstore\ --*) ;;
- * ) printf "$0: rcvstore -v generated unexpected output\n" >&2
- failed=`expr ${failed:-0} + 1`;;
+ * ) printf '%s: rcvstore -v generated unexpected output\n' "$0" >&2
+ failed=`expr ${failed:-0} + 1`;;
esac
# check unknown switch
esac
# check unknown switch
@@
-194,7
+194,7
@@
check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
# check Msg-Protect profile entry
msgprot=640
# check Msg-Protect profile entry
msgprot=640
-printf "Msg-Protect: $msgprot\n" >>$MH
+printf 'Msg-Protect: %s\n' "$msgprot" >>$MH
$rcvstore <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
check $expected $actual
run_test "find ${MH_TEST_DIR}/Mail/inbox/11 -perm $msgprot" \
$rcvstore <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
check $expected $actual
run_test "find ${MH_TEST_DIR}/Mail/inbox/11 -perm $msgprot" \
diff --git
a/test/rcv/test-rcvtty
b/test/rcv/test-rcvtty
index
6d61de2
..
1d0fea8
100755
(executable)
--- a/
test/rcv/test-rcvtty
+++ b/
test/rcv/test-rcvtty
@@
-43,7
+43,7
@@
check "$expected" "$actual"
# check -version
case `$rcvtty -v` in
rcvtty\ --*) ;;
# check -version
case `$rcvtty -v` in
rcvtty\ --*) ;;
- * ) printf "$0: rcvtty -v generated unexpected output\n" >&2
+ * ) printf '%s: rcvtty -v generated unexpected output\n' "$0" >&2
failed=`expr ${failed:-0} + 1`;;
esac
failed=`expr ${failed:-0} + 1`;;
esac
diff --git
a/test/repl/test-repl
b/test/repl/test-repl
index
d9c39a1
..
0b5b483
100755
(executable)
--- a/
test/repl/test-repl
+++ b/
test/repl/test-repl
@@
-61,8
+61,8
@@
check $expected $actual
# check -version
case `repl -v` in
repl\ --*) ;;
# check -version
case `repl -v` in
repl\ --*) ;;
- * ) printf "$0: repl -v generated unexpected output\n" >&2
- failed=`expr ${failed:-0} + 1`;;
+ * ) printf '%s: repl -v generated unexpected output\n' "$0" >&2
+ failed=`expr ${failed:-0} + 1`;;
esac
# check unknown switch
esac
# check unknown switch
@@
-72,7
+72,7
@@
run_test "repl -nonexistent" 'repl: -nonexistent unknown'
run_test "repl" 'repl: no cur message'
run_test "repl" 'repl: no cur message'
-printf "Local-Mailbox: mymailbox@localhost%s\n" >> $MH
+printf 'Local-Mailbox: mymailbox@localhost\n' >> $MH
# check -cc me
cat >$expected <<EOF
# check -cc me
cat >$expected <<EOF
@@
-106,7
+106,7
@@
check $expected $actual
# check -cc me with Local- and Alternate-Mailbox addtions, Bug #36635:
# -nocc me doesn't account for Alternate-Mailboxes.
# check -cc me with Local- and Alternate-Mailbox addtions, Bug #36635:
# -nocc me doesn't account for Alternate-Mailboxes.
-printf "Alternate-Mailboxes: user@example.com\n" >> $MH
+printf 'Alternate-Mailboxes: user@example.com\n' >> $MH
cat >$expected <<EOF
From: mymailbox@localhost
cat >$expected <<EOF
From: mymailbox@localhost
diff --git
a/test/whatnow/test-cd
b/test/whatnow/test-cd
index
ef6175d
..
48389cb
100755
(executable)
--- a/
test/whatnow/test-cd
+++ b/
test/whatnow/test-cd
@@
-57,7
+57,7
@@
EOF
# ||true to ignore whatnow's exit status
# watch the quoting -- shell and printf and then the shell run inside whatnow
# ||true to ignore whatnow's exit status
# watch the quoting -- shell and printf and then the shell run inside whatnow
-printf "cd $MH_TEST_DIR/foo\\\\'s\\\\ bar\npwd\n" | \
+printf 'cd %s/foo\\'"'"'s\\ bar\npwd\n' "$MH_TEST_DIR" | \
TERM=dumb whatnow -noedit -prompt '' 2> "$actualerr" > "$actual" || true
check "$expectederr" "$actualerr"
TERM=dumb whatnow -noedit -prompt '' 2> "$actualerr" > "$actual" || true
check "$expectederr" "$actualerr"