From 895b07cae9741f44a1272b2f3875f8dd94763222 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Mon, 24 Jun 2013 15:32:40 +0200 Subject: Added support for SIZE SMTP extension (RFC-1870). --- tests/net/smtp/SMTPCommandTest.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tests/net/smtp/SMTPCommandTest.cpp') diff --git a/tests/net/smtp/SMTPCommandTest.cpp b/tests/net/smtp/SMTPCommandTest.cpp index ce9e7ce5..9a2c90fc 100644 --- a/tests/net/smtp/SMTPCommandTest.cpp +++ b/tests/net/smtp/SMTPCommandTest.cpp @@ -41,6 +41,8 @@ VMIME_TEST_SUITE_BEGIN(SMTPCommandTest) VMIME_TEST(testMAIL) VMIME_TEST(testMAIL_Encoded) VMIME_TEST(testMAIL_UTF8) + VMIME_TEST(testMAIL_SIZE) + VMIME_TEST(testMAIL_SIZE_UTF8) VMIME_TEST(testRCPT) VMIME_TEST(testRCPT_Encoded) VMIME_TEST(testRCPT_UTF8) @@ -127,6 +129,24 @@ VMIME_TEST_SUITE_BEGIN(SMTPCommandTest) VASSERT_EQ("Text", "MAIL FROM: SMTPUTF8", cmd->getText()); } + void testMAIL_SIZE() + { + vmime::ref cmd = SMTPCommand::MAIL + (vmime::mailbox("me@vmime.org"), false, 123456789); + + VASSERT_NOT_NULL("Not null", cmd); + VASSERT_EQ("Text", "MAIL FROM: SIZE=123456789", cmd->getText()); + } + + void testMAIL_SIZE_UTF8() + { + vmime::ref cmd = SMTPCommand::MAIL + (vmime::mailbox(vmime::emailAddress("mailtest", "例え.テスト")), true, 123456789); + + VASSERT_NOT_NULL("Not null", cmd); + VASSERT_EQ("Text", "MAIL FROM: SMTPUTF8 SIZE=123456789", cmd->getText()); + } + void testRCPT() { vmime::ref cmd = SMTPCommand::RCPT(vmime::mailbox("someone@vmime.org"), false); -- cgit v1.2.3