[geary] Fix build warning.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Fix build warning.
- Date: Sat, 21 Dec 2019 07:31:54 +0000 (UTC)
commit b08cee788398f7ca6bd794ad93927794d05db082
Author: Michael Gratton <mike vee net>
Date: Sat Dec 21 18:31:03 2019 +1100
Fix build warning.
test/engine/rfc822-mailbox-address-test.vala | 38 +++++++++++++---------------
1 file changed, 17 insertions(+), 21 deletions(-)
---
diff --git a/test/engine/rfc822-mailbox-address-test.vala b/test/engine/rfc822-mailbox-address-test.vala
index 714da286..6b47a81f 100644
--- a/test/engine/rfc822-mailbox-address-test.vala
+++ b/test/engine/rfc822-mailbox-address-test.vala
@@ -153,27 +153,23 @@ class Geary.RFC822.MailboxAddressTest : TestCase {
}
}
- public void prepare_header_text_part() throws Error {
- try {
- // Test if prepare_header_text_part() can handle crappy input without grilling the CPU
- MailboxAddress addr = new MailboxAddress.imap(
-
"=?UTF-8?Q?=22Firstname_=22=C2=AF\\=5F=28=E3=83=84=29=5F/=C2=AF=22_Lastname_via?==?UTF-8?Q?_Vendor=22_<system
vendor com>?=",
- null,
-
"=?UTF-8?Q?=22Firstname_=22=C2=AF\\=5F=28=E3=83=84=29=5F/=C2=AF=22_Lastname_via?==?UTF-8?Q?_Vendor=22_<system
vendor com>?=",
- "vendor.com");
- assert(addr.name == "\"Firstname \"¯_(ツ)_/¯\" Lastname via Vendor\" <system vendor com>");
- assert(addr.mailbox == "\"Firstname \"¯_(ツ)_/¯\" Lastname via Vendor\" <system vendor com>");
-
- // A second test with the input that have been passed to prepare_header_text_part() by the
pre-GMime3 tests
- addr = new MailboxAddress.imap(
- "\"Firstname \"¯_(ツ)_/¯\" Lastname via=?UTF-8?Q?_Vendor=22_",
- null,
- "system",
- "vendor.com");
- assert(addr.name == "Firstname ¯_(ツ)_/¯ Lastname via=?UTF-8?Q?_Vendor=22_");
- } catch (Error err) {
- assert_not_reached();
- }
+ public void prepare_header_text_part() throws GLib.Error {
+ // Test if prepare_header_text_part() can handle crappy input without grilling the CPU
+ MailboxAddress addr = new MailboxAddress.imap(
+
"=?UTF-8?Q?=22Firstname_=22=C2=AF\\=5F=28=E3=83=84=29=5F/=C2=AF=22_Lastname_via?==?UTF-8?Q?_Vendor=22_<system
vendor com>?=",
+ null,
+
"=?UTF-8?Q?=22Firstname_=22=C2=AF\\=5F=28=E3=83=84=29=5F/=C2=AF=22_Lastname_via?==?UTF-8?Q?_Vendor=22_<system
vendor com>?=",
+ "vendor.com");
+ assert(addr.name == "\"Firstname \"¯_(ツ)_/¯\" Lastname via Vendor\" <system vendor com>");
+ assert(addr.mailbox == "\"Firstname \"¯_(ツ)_/¯\" Lastname via Vendor\" <system vendor com>");
+
+ // A second test with the input that have been passed to prepare_header_text_part() by the
pre-GMime3 tests
+ addr = new MailboxAddress.imap(
+ "\"Firstname \"¯_(ツ)_/¯\" Lastname via=?UTF-8?Q?_Vendor=22_",
+ null,
+ "system",
+ "vendor.com");
+ assert(addr.name == "Firstname ¯_(ツ)_/¯ Lastname via=?UTF-8?Q?_Vendor=22_");
}
public void has_distinct_name() throws Error {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]