From ecf9dbafe69cf9560473f24b311278b746a30848 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Mon, 9 Jan 2006 18:02:25 +0000 Subject: Allow '@' in the username part of an URL. --- tests/utility/urlTest.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/utility/urlTest.cpp') 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://account@myserver.com:password@myserver.com")); + VASSERT_EQ("2", "account@myserver.com", 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"); -- cgit v1.2.3