Add unit tests for Geary.RFC822.Message body content, fix a few issues.
* src/engine/rfc822/rfc822-message.vala (Message): Fix has_plain_body(), handle the case where displayed MIME entities (as opposed to attached ones) with no Content-Type default to US-ASCII, per the RFC. * test/engine/rfc822-message-test.vala (MessageTest): Add tests for testing and accessing body content as both plain text and HTML. Use GResources for accessing test message bodies rather than extremely long const strings.
This commit is contained in:
parent
a2a95686b4
commit
bfe665d1a0
8 changed files with 248 additions and 62 deletions
17
test/data/basic-text-plain.eml
Normal file
17
test/data/basic-text-plain.eml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
From: Alice <alice@example.net>
|
||||
Sender: Bob <bob@example.net>
|
||||
To: Charlie <charlie@example.net>
|
||||
CC: Dave <dave@example.net>
|
||||
BCC: Eve <eve@example.net>
|
||||
Reply-To: "Alice: Personal Account" <alice@example.org>
|
||||
Subject: Re: Basic text/plain message
|
||||
Date: Fri, 21 Nov 1997 10:01:10 -0600
|
||||
Message-ID: <3456@example.net>
|
||||
In-Reply-To: <1234@local.machine.example>
|
||||
References: <1234@local.machine.example>
|
||||
X-Mailer: Geary Test Suite 1.0
|
||||
|
||||
This is the first line.
|
||||
|
||||
This is the second line.
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue