summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d9c88cd)
Steven Winikoff reported to nmh-workers that some tests failed in 1.7
configured with --with-hash-backup because they assume the backup prefix
is comma rather than hash. Alter those tests to use `mhparam sbackup',
as other tests already do. PATH is already set to use the mhparam being
tested.
test-mhfixmsg used find(1) to check for leftover files that globbed
`mhfix*' or `,mhfix*'. Changed to just `*mhfix*' as I think any file
containing that would be unwanted, and it will also spot mhfixmsg
hard-coding the comma prefix.
}
draft="$MH_TEST_DIR/$$.draft"
}
draft="$MH_TEST_DIR/$$.draft"
-draftorig="$MH_TEST_DIR/,$$.draft.orig"
+draftorig="$MH_TEST_DIR/`mhparam sbackup`$$.draft.orig"
expected="$MH_TEST_DIR/$$.expected"
actual="$MH_TEST_DIR/$$.actual"
expected="$MH_TEST_DIR/$$.expected"
actual="$MH_TEST_DIR/$$.actual"
QUOTED-PRINTABLE with 8 bit"
check "$expected" "$actual" 'keep first'
QUOTED-PRINTABLE with 8 bit"
check "$expected" "$actual" 'keep first'
+sbackup="`mhparam sbackup`"
# check with no options: checks backup
start_test "with no options: checks backup"
# check with no options: checks backup
start_test "with no options: checks backup"
run_test 'mhfixmsg' ''
check "$expected" "$MH_TEST_DIR"/Mail/inbox/11 'keep first'
cp "$MH_TEST_DIR"/Mail/inbox/11.original "$MH_TEST_DIR"/Mail/inbox/11
run_test 'mhfixmsg' ''
check "$expected" "$MH_TEST_DIR"/Mail/inbox/11 'keep first'
cp "$MH_TEST_DIR"/Mail/inbox/11.original "$MH_TEST_DIR"/Mail/inbox/11
-check "$MH_TEST_DIR"/Mail/inbox/,11 "$MH_TEST_DIR"/Mail/inbox/11.original
+check "$MH_TEST_DIR/Mail/inbox/${sbackup}11" "$MH_TEST_DIR"/Mail/inbox/11.original
# check backup with -file
# check backup with -file
folder last >/dev/null
run_test 'mhfixmsg -file '"$MH_TEST_DIR"/Mail/inbox/11 ''
check "$MH_TEST_DIR"/Mail/inbox/11 "$expected" 'keep first'
folder last >/dev/null
run_test 'mhfixmsg -file '"$MH_TEST_DIR"/Mail/inbox/11 ''
check "$MH_TEST_DIR"/Mail/inbox/11 "$expected" 'keep first'
-check "$MH_TEST_DIR"/Mail/inbox/,11 "$MH_TEST_DIR"/Mail/inbox/11.original
+check "$MH_TEST_DIR/Mail/inbox/${sbackup}11" "$MH_TEST_DIR"/Mail/inbox/11.original
# check -file with directory
# check -file with directory
run_test 'mhfixmsg 21 -normmproc'
check "${MH_TEST_DIR}/Mail/inbox/22" \
run_test 'mhfixmsg 21 -normmproc'
check "${MH_TEST_DIR}/Mail/inbox/22" \
- "${MH_TEST_DIR}/Mail/inbox/,21" 'keep first'
+ "${MH_TEST_DIR}/Mail/inbox/${sbackup}21" 'keep first'
# make sure there are no tmp files left over
# make sure there are no tmp files left over
-find "$MH_TEST_DIR/Mail" \( -name 'mhfix*' -o -name ',mhfix*' \) -print \
+find "$MH_TEST_DIR/Mail" -name '*mhfix*' -print \
>"$actual"
cat >"$expected" <<EOF
EOF
>"$actual"
cat >"$expected" <<EOF
EOF
post: problem initializing server; [BHST] ready; I'll buy that for a dollar!
send: message not delivered to anyone
EOF
post: problem initializing server; [BHST] ready; I'll buy that for a dollar!
send: message not delivered to anyone
EOF
-mv -f "${MH_TEST_DIR}/Mail/,draft" "${MH_TEST_DIR}/Mail/draft"
+mv -f "${MH_TEST_DIR}/Mail/`mhparam sbackup`draft" "${MH_TEST_DIR}/Mail/draft"
set +e
test_post "${testname}.actual" "${testname}.expected" 2>"${testname}.err"
set +e
test_post "${testname}.actual" "${testname}.expected" 2>"${testname}.err"
run_test 'scan +other last -format %(msg):%(decode{subject})' \
'11:Testing message 9'
run_test 'scan +other last -format %(msg):%(decode{subject})' \
'11:Testing message 9'
+sbackup="`mhparam sbackup`"
+
# check -unlink
run_test 'refile 3 -src +inbox +other -unlink' ''
run_test 'folders -noheader' \
# check -unlink
run_test 'refile 3 -src +inbox +other -unlink' ''
run_test 'folders -noheader' \
other has 6 messages (1-12).
TOTAL = 12 messages in 2 folders.'
other has 6 messages (1-12).
TOTAL = 12 messages in 2 folders.'
-if test -f $MH_TEST_DIR/Mail/inbox/,3; then
+if test -f "$MH_TEST_DIR/Mail/inbox/${sbackup}3"; then
echo "$0: refile -unlink failed" 1>&2
failed=`expr ${failed:-0} + 1`
fi
echo "$0: refile -unlink failed" 1>&2
failed=`expr ${failed:-0} + 1`
fi
other has 7 messages (1-13).
TOTAL = 12 messages in 2 folders.'
other has 7 messages (1-13).
TOTAL = 12 messages in 2 folders.'
-if test -f $MH_TEST_DIR/Mail/inbox/,2; then
+if test -f "$MH_TEST_DIR/Mail/inbox/${sbackup}2"; then
:
else
echo "$0: refile -nounlink failed" 1>&2
:
else
echo "$0: refile -nounlink failed" 1>&2