From c860c273d388d8b1b2a94f6ce3457b9f6f3d53e9 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Thu, 13 Feb 2014 22:23:59 +0100 Subject: Added support for initial response in SASL authentication. --- tests/net/pop3/POP3CommandTest.cpp | 9 +++++++++ tests/net/smtp/SMTPCommandTest.cpp | 9 +++++++++ 2 files changed, 18 insertions(+) (limited to 'tests') diff --git a/tests/net/pop3/POP3CommandTest.cpp b/tests/net/pop3/POP3CommandTest.cpp index 4733c96b..139e948b 100644 --- a/tests/net/pop3/POP3CommandTest.cpp +++ b/tests/net/pop3/POP3CommandTest.cpp @@ -39,6 +39,7 @@ VMIME_TEST_SUITE_BEGIN(POP3CommandTest) VMIME_TEST(testCAPA) VMIME_TEST(testNOOP) VMIME_TEST(testAUTH) + VMIME_TEST(testAUTH_InitialResponse) VMIME_TEST(testSTLS) VMIME_TEST(testAPOP) VMIME_TEST(testUSER) @@ -97,6 +98,14 @@ VMIME_TEST_SUITE_BEGIN(POP3CommandTest) VASSERT_EQ("Text", "AUTH saslmechanism", cmd->getText()); } + void testAUTH_InitialResponse() + { + vmime::shared_ptr cmd = POP3Command::AUTH("saslmechanism", "initial-response"); + + VASSERT_NOT_NULL("Not null", cmd); + VASSERT_EQ("Text", "AUTH saslmechanism initial-response", cmd->getText()); + } + void testSTLS() { vmime::shared_ptr cmd = POP3Command::STLS(); diff --git a/tests/net/smtp/SMTPCommandTest.cpp b/tests/net/smtp/SMTPCommandTest.cpp index 6d466865..9480948c 100644 --- a/tests/net/smtp/SMTPCommandTest.cpp +++ b/tests/net/smtp/SMTPCommandTest.cpp @@ -37,6 +37,7 @@ VMIME_TEST_SUITE_BEGIN(SMTPCommandTest) VMIME_TEST(testHELO) VMIME_TEST(testEHLO) VMIME_TEST(testAUTH) + VMIME_TEST(testAUTH_InitialResponse) VMIME_TEST(testSTARTTLS) VMIME_TEST(testMAIL) VMIME_TEST(testMAIL_Encoded) @@ -95,6 +96,14 @@ VMIME_TEST_SUITE_BEGIN(SMTPCommandTest) VASSERT_EQ("Text", "AUTH saslmechanism", cmd->getText()); } + void testAUTH_InitialResponse() + { + vmime::shared_ptr cmd = SMTPCommand::AUTH("saslmechanism", "initial-response"); + + VASSERT_NOT_NULL("Not null", cmd); + VASSERT_EQ("Text", "AUTH saslmechanism initial-response", cmd->getText()); + } + void testSTARTTLS() { vmime::shared_ptr cmd = SMTPCommand::STARTTLS(); -- cgit v1.2.3