diff options
author | vincent-richard <[email protected]> | 2020-09-02 17:57:42 +0000 |
---|---|---|
committer | vincent-richard <[email protected]> | 2020-09-02 17:57:42 +0000 |
commit | 9205c9d0ab8eeb140fd5283fe9fd5858a90f92a0 (patch) | |
tree | 4097be1a4d07b6bcec17e5247cda6eaf7095fdd1 /tests | |
parent | Fixed missing default argument. (diff) | |
download | vmime-9205c9d0ab8eeb140fd5283fe9fd5858a90f92a0.tar.gz vmime-9205c9d0ab8eeb140fd5283fe9fd5858a90f92a0.zip |
Fixed unit test for DSN support.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/net/smtp/SMTPCommandTest.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/tests/net/smtp/SMTPCommandTest.cpp b/tests/net/smtp/SMTPCommandTest.cpp index a0f03bb6..ecaf292c 100644 --- a/tests/net/smtp/SMTPCommandTest.cpp +++ b/tests/net/smtp/SMTPCommandTest.cpp @@ -114,79 +114,79 @@ VMIME_TEST_SUITE_BEGIN(SMTPCommandTest) void testMAIL() { - vmime::shared_ptr <SMTPCommand> cmd = SMTPCommand::MAIL(vmime::mailbox("[email protected]"), false); + vmime::shared_ptr <SMTPCommand> cmd = SMTPCommand::MAIL(vmime::mailbox("[email protected]"), false, "FULL", "dsn-unique-id"); VASSERT_NOT_NULL("Not null", cmd); - VASSERT_EQ("Text", "MAIL FROM:<[email protected]>", cmd->getText()); + VASSERT_EQ("Text", "MAIL FROM:<[email protected]> RET=FULL ENVID=<dsn-unique-id>", cmd->getText()); } void testMAIL_Encoded() { vmime::shared_ptr <SMTPCommand> cmd = SMTPCommand::MAIL( - vmime::mailbox(vmime::emailAddress("mailtest", "例え.テスト")), false + vmime::mailbox(vmime::emailAddress("mailtest", "例え.テスト")), false, "FULL", "dsn-unique-id" ); VASSERT_NOT_NULL("Not null", cmd); - VASSERT_EQ("Text", "MAIL FROM:<[email protected]>", cmd->getText()); + VASSERT_EQ("Text", "MAIL FROM:<[email protected]> RET=FULL ENVID=<dsn-unique-id>", cmd->getText()); } void testMAIL_UTF8() { vmime::shared_ptr <SMTPCommand> cmd = SMTPCommand::MAIL( - vmime::mailbox(vmime::emailAddress("mailtest", "例え.テスト")), true + vmime::mailbox(vmime::emailAddress("mailtest", "例え.テスト")), true, "FULL", "dsn-unique-id" ); VASSERT_NOT_NULL("Not null", cmd); - VASSERT_EQ("Text", "MAIL FROM:<mailtest@例え.テスト> SMTPUTF8", cmd->getText()); + VASSERT_EQ("Text", "MAIL FROM:<mailtest@例え.テスト> RET=FULL ENVID=<dsn-unique-id> SMTPUTF8", cmd->getText()); } void testMAIL_SIZE() { vmime::shared_ptr <SMTPCommand> cmd = SMTPCommand::MAIL( - vmime::mailbox("[email protected]"), false, 123456789 + vmime::mailbox("[email protected]"), false, 123456789, "FULL", "dsn-unique-id" ); VASSERT_NOT_NULL("Not null", cmd); - VASSERT_EQ("Text", "MAIL FROM:<[email protected]> SIZE=123456789", cmd->getText()); + VASSERT_EQ("Text", "MAIL FROM:<[email protected]> RET=FULL ENVID=<dsn-unique-id> SIZE=123456789", cmd->getText()); } void testMAIL_SIZE_UTF8() { vmime::shared_ptr <SMTPCommand> cmd = SMTPCommand::MAIL( - vmime::mailbox(vmime::emailAddress("mailtest", "例え.テスト")), true, 123456789 + vmime::mailbox(vmime::emailAddress("mailtest", "例え.テスト")), true, 123456789, "FULL", "dsn-unique-id" ); VASSERT_NOT_NULL("Not null", cmd); - VASSERT_EQ("Text", "MAIL FROM:<mailtest@例え.テスト> SMTPUTF8 SIZE=123456789", cmd->getText()); + VASSERT_EQ("Text", "MAIL FROM:<mailtest@例え.テスト> RET=FULL ENVID=<dsn-unique-id> SMTPUTF8 SIZE=123456789", cmd->getText()); } void testRCPT() { vmime::shared_ptr <SMTPCommand> cmd = - SMTPCommand::RCPT(vmime::mailbox("[email protected]"), false); + SMTPCommand::RCPT(vmime::mailbox("[email protected]"), false, "NEVER"); VASSERT_NOT_NULL("Not null", cmd); - VASSERT_EQ("Text", "RCPT TO:<[email protected]>", cmd->getText()); + VASSERT_EQ("Text", "RCPT TO:<[email protected]> NOTIFY=NEVER", cmd->getText()); } void testRCPT_Encoded() { vmime::shared_ptr <SMTPCommand> cmd = SMTPCommand::RCPT( - vmime::mailbox(vmime::emailAddress("mailtest", "例え.テスト")), false + vmime::mailbox(vmime::emailAddress("mailtest", "例え.テスト")), false, "NEVER" ); VASSERT_NOT_NULL("Not null", cmd); - VASSERT_EQ("Text", "RCPT TO:<[email protected]>", cmd->getText()); + VASSERT_EQ("Text", "RCPT TO:<[email protected]> NOTIFY=NEVER", cmd->getText()); } void testRCPT_UTF8() { vmime::shared_ptr <SMTPCommand> cmd = SMTPCommand::RCPT( - vmime::mailbox(vmime::emailAddress("mailtest", "例え.テスト")), true + vmime::mailbox(vmime::emailAddress("mailtest", "例え.テスト")), true, "NEVER" ); VASSERT_NOT_NULL("Not null", cmd); - VASSERT_EQ("Text", "RCPT TO:<mailtest@例え.テスト>", cmd->getText()); + VASSERT_EQ("Text", "RCPT TO:<mailtest@例え.テスト> NOTIFY=NEVER", cmd->getText()); } void testRSET() { |