aboutsummaryrefslogtreecommitdiffstats
path: root/tests/net/smtp/SMTPCommandTest.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2013-06-20 09:02:39 +0000
committerVincent Richard <[email protected]>2013-06-20 09:02:39 +0000
commiteee80fc81e007baacbce80afe55e69a52bcfd1f6 (patch)
tree4ed1aeecac70ef7ab614f2956e306bbc427fe837 /tests/net/smtp/SMTPCommandTest.cpp
parentMoved SMTP connection-related things to SMTPConnection object. (diff)
downloadvmime-eee80fc81e007baacbce80afe55e69a52bcfd1f6.tar.gz
vmime-eee80fc81e007baacbce80afe55e69a52bcfd1f6.zip
Added support for CHUNKING SMTP extension (RFC-3030). More robust unit tests for SMTP.
Diffstat (limited to '')
-rw-r--r--tests/net/smtp/SMTPCommandTest.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/net/smtp/SMTPCommandTest.cpp b/tests/net/smtp/SMTPCommandTest.cpp
index d93bc729..ce9e7ce5 100644
--- a/tests/net/smtp/SMTPCommandTest.cpp
+++ b/tests/net/smtp/SMTPCommandTest.cpp
@@ -46,6 +46,7 @@ VMIME_TEST_SUITE_BEGIN(SMTPCommandTest)
VMIME_TEST(testRCPT_UTF8)
VMIME_TEST(testRSET)
VMIME_TEST(testDATA)
+ VMIME_TEST(testBDAT)
VMIME_TEST(testNOOP)
VMIME_TEST(testQUIT)
VMIME_TEST(testWriteToSocket)
@@ -168,6 +169,19 @@ VMIME_TEST_SUITE_BEGIN(SMTPCommandTest)
VASSERT_EQ("Text", "DATA", cmd->getText());
}
+ void testBDAT()
+ {
+ vmime::ref <SMTPCommand> cmd1 = SMTPCommand::BDAT(12345, false);
+
+ VASSERT_NOT_NULL("Not null", cmd1);
+ VASSERT_EQ("Text", "BDAT 12345", cmd1->getText());
+
+ vmime::ref <SMTPCommand> cmd2 = SMTPCommand::BDAT(67890, true);
+
+ VASSERT_NOT_NULL("Not null", cmd2);
+ VASSERT_EQ("Text", "BDAT 67890 LAST", cmd2->getText());
+ }
+
void testNOOP()
{
vmime::ref <SMTPCommand> cmd = SMTPCommand::NOOP();