diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-03-18 11:37:31 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2016-03-19 09:48:44 +0100 |
commit | 28b2efcb190edd97b802ac9055eaf417f141f724 (patch) | |
tree | 0deb275da1344a8d5e0837b75c97e7cf50b8e463 /test/libapt | |
parent | ff5318caf714c3b26fa37aa4debf138ccf416fc1 (diff) | |
download | apt-28b2efcb190edd97b802ac9055eaf417f141f724.tar.gz |
tests: reenable basic auth test and add @ in username
On launchpad #1558484 a user reports that @ in the authentication tokens
parsing of sources.list isn't working in an older (precise) version. It
isn't the recommended way of specifying passwords and co (auth.conf is),
but we can at least test for regressions (and in this case test at all…
who was that "clever" boy disabling a test with exit……… oh, nevermind.
Git-Dch: Ignore
Diffstat (limited to 'test/libapt')
-rw-r--r-- | test/libapt/uri_test.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/libapt/uri_test.cc b/test/libapt/uri_test.cc index fe6015e65..d8f3ffe45 100644 --- a/test/libapt/uri_test.cc +++ b/test/libapt/uri_test.cc @@ -159,7 +159,7 @@ TEST(URITest, RFC2732) EXPECT_EQ("cdrom://Foo Bar Cow", URI::SiteOnly(U)); EXPECT_EQ("cdrom://Foo Bar Cow/debian", URI::ArchiveOnly(U)); EXPECT_EQ("cdrom://Foo Bar Cow/debian/", URI::NoUserPassword(U)); - // percent encoded + // percent encoded password U = URI("ftp://foo:b%40r@example.org"); EXPECT_EQ("foo", U.User); EXPECT_EQ("b@r", U.Password); @@ -167,4 +167,12 @@ TEST(URITest, RFC2732) EXPECT_EQ("ftp://example.org", URI::SiteOnly(U)); EXPECT_EQ("ftp://example.org", URI::ArchiveOnly(U)); EXPECT_EQ("ftp://example.org/", URI::NoUserPassword(U)); + // percent encoded user + U = URI("ftp://f%40o:bar@example.org"); + EXPECT_EQ("f@o", U.User); + EXPECT_EQ("bar", U.Password); + EXPECT_EQ("ftp://f%40o:bar@example.org/", (std::string) U); + EXPECT_EQ("ftp://example.org", URI::SiteOnly(U)); + EXPECT_EQ("ftp://example.org", URI::ArchiveOnly(U)); + EXPECT_EQ("ftp://example.org/", URI::NoUserPassword(U)); } |