aboutsummaryrefslogtreecommitdiffstats
path: root/tests/net/smtp/SMTPCommandTest.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2013-06-24 13:32:40 +0000
committerVincent Richard <[email protected]>2013-06-24 13:32:40 +0000
commit895b07cae9741f44a1272b2f3875f8dd94763222 (patch)
tree6532de59e01676c78b423b5de5ebc1411c7da111 /tests/net/smtp/SMTPCommandTest.cpp
parentReturn after sending message when sending is supported. (diff)
downloadvmime-895b07cae9741f44a1272b2f3875f8dd94763222.tar.gz
vmime-895b07cae9741f44a1272b2f3875f8dd94763222.zip
Added support for SIZE SMTP extension (RFC-1870).
Diffstat (limited to '')
-rw-r--r--tests/net/smtp/SMTPCommandTest.cpp20
1 files changed, 20 insertions, 0 deletions
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:<mailtest@例え.テスト> SMTPUTF8", cmd->getText());
}
+ void testMAIL_SIZE()
+ {
+ vmime::ref <SMTPCommand> cmd = SMTPCommand::MAIL
+ (vmime::mailbox("[email protected]"), false, 123456789);
+
+ VASSERT_NOT_NULL("Not null", cmd);
+ VASSERT_EQ("Text", "MAIL FROM:<[email protected]> SIZE=123456789", cmd->getText());
+ }
+
+ void testMAIL_SIZE_UTF8()
+ {
+ vmime::ref <SMTPCommand> cmd = SMTPCommand::MAIL
+ (vmime::mailbox(vmime::emailAddress("mailtest", "例え.テスト")), true, 123456789);
+
+ VASSERT_NOT_NULL("Not null", cmd);
+ VASSERT_EQ("Text", "MAIL FROM:<mailtest@例え.テスト> SMTPUTF8 SIZE=123456789", cmd->getText());
+ }
+
void testRCPT()
{
vmime::ref <SMTPCommand> cmd = SMTPCommand::RCPT(vmime::mailbox("[email protected]"), false);