]> git.saurik.com Git - apt.git/blobdiff - test/libapt/uri_test.cc
clear HitEof flag in FileFd::Seek
[apt.git] / test / libapt / uri_test.cc
index 99bb3067e3185452c4b704c9e192857b400662dc..6559f1390183a69fde67fee774f08e812a6e9314 100644 (file)
@@ -1,5 +1,9 @@
+#include <config.h>
+
 #include <apt-pkg/strutl.h>
 
+#include <string>
+
 #include "assert.h"
 
 int main() {
@@ -108,5 +112,13 @@ int main() {
        equals("/debian/", U.Path);
        }
 
+        // Percent-encoding.
+        {
+        URI U("ftp://foo:b%40r@example.org");
+        equals("foo", U.User);
+        equals("b@r", U.Password);
+        equals("ftp://foo:b%40r@example.org/", (std::string) U);
+        }
+
        return 0;
 }