Previously, top-level message headers were printed as Subject, From,
To, Date, while embedded message headers were printed From, To,
Subject, Date. This makes both cases use the former order and updates
the tests accordingly.
Strangely, the raw format also uses this function, so this also fixes
the two raw format tests affected by this change.
InternetAddressList *recipients;
const char *recipients_string;
InternetAddressList *recipients;
const char *recipients_string;
+ printf ("Subject: %s\n", g_mime_message_get_subject (message));
printf ("From: %s\n", g_mime_message_get_sender (message));
recipients = g_mime_message_get_recipients (message, GMIME_RECIPIENT_TYPE_TO);
recipients_string = internet_address_list_to_string (recipients, 0);
printf ("From: %s\n", g_mime_message_get_sender (message));
recipients = g_mime_message_get_recipients (message, GMIME_RECIPIENT_TYPE_TO);
recipients_string = internet_address_list_to_string (recipients, 0);
if (recipients_string)
printf ("Cc: %s\n",
recipients_string);
if (recipients_string)
printf ("Cc: %s\n",
recipients_string);
- printf ("Subject: %s\n", g_mime_message_get_subject (message));
printf ("Date: %s\n", g_mime_message_get_date_as_string (message));
}
printf ("Date: %s\n", g_mime_message_get_date_as_string (message));
}
\fpart{ ID: 2, Content-type: multipart/mixed
\fpart{ ID: 3, Content-type: message/rfc822
\fheader{
\fpart{ ID: 2, Content-type: multipart/mixed
\fpart{ ID: 3, Content-type: message/rfc822
\fheader{
From: Carl Worth <cworth@cworth.org>
To: cworth@cworth.org
From: Carl Worth <cworth@cworth.org>
To: cworth@cworth.org
Date: Fri, 05 Jan 2001 15:42:57 +0000
\fheader}
\fbody{
Date: Fri, 05 Jan 2001 15:42:57 +0000
\fheader}
\fbody{
\fpart{ ID: 2, Content-type: multipart/mixed
\fpart{ ID: 3, Content-type: message/rfc822
\fheader{
\fpart{ ID: 2, Content-type: multipart/mixed
\fpart{ ID: 3, Content-type: message/rfc822
\fheader{
From: Carl Worth <cworth@cworth.org>
To: cworth@cworth.org
From: Carl Worth <cworth@cworth.org>
To: cworth@cworth.org
Date: Fri, 05 Jan 2001 15:42:57 +0000
\fheader}
\fbody{
Date: Fri, 05 Jan 2001 15:42:57 +0000
\fheader}
\fbody{
\fpart{ ID: 2, Content-type: multipart/mixed
\fpart{ ID: 3, Content-type: message/rfc822
\fheader{
\fpart{ ID: 2, Content-type: multipart/mixed
\fpart{ ID: 3, Content-type: message/rfc822
\fheader{
From: Carl Worth <cworth@cworth.org>
To: cworth@cworth.org
From: Carl Worth <cworth@cworth.org>
To: cworth@cworth.org
Date: Fri, 05 Jan 2001 15:42:57 +0000
\fheader}
\fbody{
Date: Fri, 05 Jan 2001 15:42:57 +0000
\fheader}
\fbody{
cat <<EOF >EXPECTED
\fpart{ ID: 3, Content-type: message/rfc822
\fheader{
cat <<EOF >EXPECTED
\fpart{ ID: 3, Content-type: message/rfc822
\fheader{
From: Carl Worth <cworth@cworth.org>
To: cworth@cworth.org
From: Carl Worth <cworth@cworth.org>
To: cworth@cworth.org
Date: Fri, 05 Jan 2001 15:42:57 +0000
\fheader}
\fbody{
Date: Fri, 05 Jan 2001 15:42:57 +0000
\fheader}
\fbody{
# output should *not* include newline
echo >>OUTPUT
cat <<EOF >EXPECTED
# output should *not* include newline
echo >>OUTPUT
cat <<EOF >EXPECTED
From: Carl Worth <cworth@cworth.org>
To: cworth@cworth.org
From: Carl Worth <cworth@cworth.org>
To: cworth@cworth.org
Date: Fri, 05 Jan 2001 15:42:57 +0000
<p>This is an embedded message, with a multipart/alternative part.</p>
Date: Fri, 05 Jan 2001 15:42:57 +0000
<p>This is an embedded message, with a multipart/alternative part.</p>
test_begin_subtest "--format=raw --part=2, multipart/mixed"
notmuch show --format=raw --part=2 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
cat <<EOF >EXPECTED
test_begin_subtest "--format=raw --part=2, multipart/mixed"
notmuch show --format=raw --part=2 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
cat <<EOF >EXPECTED
From: Carl Worth <cworth@cworth.org>
To: cworth@cworth.org
From: Carl Worth <cworth@cworth.org>
To: cworth@cworth.org
Date: Fri, 05 Jan 2001 15:42:57 +0000
<p>This is an embedded message, with a multipart/alternative part.</p>
Date: Fri, 05 Jan 2001 15:42:57 +0000
<p>This is an embedded message, with a multipart/alternative part.</p>