aboutsummaryrefslogtreecommitdiffstats
path: root/tests/utility/urlTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/utility/urlTest.cpp')
-rw-r--r--tests/utility/urlTest.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/utility/urlTest.cpp b/tests/utility/urlTest.cpp
index d023476a..9214eb1c 100644
--- a/tests/utility/urlTest.cpp
+++ b/tests/utility/urlTest.cpp
@@ -38,6 +38,7 @@ VMIME_TEST_SUITE_BEGIN
VMIME_TEST(testParse2)
VMIME_TEST(testParse3)
VMIME_TEST(testParse4)
+ VMIME_TEST(testParse5)
VMIME_TEST(testGenerate)
VMIME_TEST(testUtilsEncode)
VMIME_TEST(testUtilsDecode)
@@ -190,6 +191,17 @@ VMIME_TEST_SUITE_BEGIN
VASSERT_EQ("4.4", "/path", u4.getPath());
}
+ // '@' symbol in the username part
+ void testParse5()
+ {
+ vmime::utility::url u1("", "");
+
+ VASSERT_EQ("1", true, parseHelper(u1, "imap://[email protected]:[email protected]"));
+ VASSERT_EQ("2", "[email protected]", u1.getUsername());
+ VASSERT_EQ("3", "password", u1.getPassword());
+ VASSERT_EQ("4", "myserver.com", u1.getHost());
+ }
+
void testGenerate()
{
vmime::utility::url u1("proto", "host", 12345, "path", "user", "password");