actually works in the absence of a Fcc header in the replied-to message.
- A Content-ID is generated for message/external-body entities as required
by RFC 2045, even if -nocontentid is supplied to mhbuild.
-- Post will now expand aliases on a "From" line when doing a BCC (bug #51098)
+- post will now expand aliases on a "From" line when doing a BCC [Bug #51098].
+- scan can now handle empty files without violating an assert [Bug #51693].
-------------------
DEPRECATED FEATURES
static size_t
read_more (m_getfld_state_t s) {
- /* Retain at least edelimlen characters that have already been
- read so that we can back up to them in m_Eom(). */
- ssize_t retain = s->edelimlen;
+ /* Retain at least edelimlen characters that have already been read,
+ if at least edelimlen have been read, so that we can back up to them
+ in m_Eom(). */
+ ssize_t retain = s->end - s->msg_buf < s->edelimlen ? 0 : s->edelimlen;
size_t num_read;
- if (retain < s->end - s->readpos)
- retain = s->end - s->readpos;
- assert (retain <= s->readpos - s->msg_buf);
+ if (retain > 0) {
+ if (retain < s->end - s->readpos)
+ retain = s->end - s->readpos;
+ assert (retain <= s->readpos - s->msg_buf);
- /* Move what we want to retain at end of the buffer to the beginning. */
- memmove (s->msg_buf, s->readpos - retain, retain);
+ /* Move what we want to retain at end of the buffer to the beginning. */
+ memmove (s->msg_buf, s->readpos - retain, retain);
+ }
s->readpos = s->msg_buf + retain;
num_read = fread (s->readpos, 1, MSG_INPUT_SIZE, s->iob);
expected="$MH_TEST_DIR/$$.expected"
actual="$MH_TEST_DIR/$$.actual"
+
+# check -width
+start_test '-width'
cat >"$expected" <<EOF
1 09/29 Test1 Testing message 1<<This is message number 1 >>
2 09/29 Test2 Testing message 2<<This is message number 2 >>
run_prog scan +inbox -width 80 >"$actual" || exit 1
check "$expected" "$actual"
+
# check highlighting
+start_test 'highlighting'
cat >"$expected" <<EOF
1 09/29 Test1 Testing message 1<<This is message number 1 >>\e[m
2 09/29 Test2 Testing message 2<<This is message number 2 >>\e[m
check "$expected" "$actual"
+# check null input
+start_test 'null input'
+run_test 'scan -format "" -file /dev/null' ''
+
+
+finish_test
exit $failed