summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-bug-595691-empty-and-broken-archive-files14
-rwxr-xr-xtest/integration/test-releasefile-verification4
-rw-r--r--test/libapt/uri_test.cc8
3 files changed, 17 insertions, 9 deletions
diff --git a/test/integration/test-bug-595691-empty-and-broken-archive-files b/test/integration/test-bug-595691-empty-and-broken-archive-files
index 4611b8b8e..a05ed5fa6 100755
--- a/test/integration/test-bug-595691-empty-and-broken-archive-files
+++ b/test/integration/test-bug-595691-empty-and-broken-archive-files
@@ -103,23 +103,23 @@ testoverhttp() {
setupcompressor "$1"
createemptyfile 'en'
- testaptgetupdate "Get: http://localhost Packages []
-Get: http://localhost Translation-en
+ testaptgetupdate "Get: http://localhost:8080 Packages []
+Get: http://localhost:8080 Translation-en
Reading package lists..." "empty file en.$COMPRESS over http"
createemptyarchive 'en'
- testaptgetupdate "Get: http://localhost Packages []
-Get: http://localhost Translation-en []
+ testaptgetupdate "Get: http://localhost:8080 Packages []
+Get: http://localhost:8080 Translation-en []
Reading package lists..." "empty archive en.$COMPRESS over http"
createemptyarchive 'Packages'
- testaptgetupdate "Get: http://localhost Packages []
+ testaptgetupdate "Get: http://localhost:8080 Packages []
Reading package lists..." "empty archive Packages.$COMPRESS over http"
createemptyfile 'Packages'
#FIXME: we should response with a good error message instead
- testaptgetupdate "Get: http://localhost Packages
-Err http://localhost Packages
+ testaptgetupdate "Get: http://localhost:8080 Packages
+Err http://localhost:8080 Packages
Empty files can't be valid archives
W: Failed to fetch ${COMPRESSOR}:$(readlink -f rootdir/var/lib/apt/lists/partial/localhost:8080_Packages) Empty files can't be valid archives
diff --git a/test/integration/test-releasefile-verification b/test/integration/test-releasefile-verification
index 01fb2e529..fba7ab290 100755
--- a/test/integration/test-releasefile-verification
+++ b/test/integration/test-releasefile-verification
@@ -37,7 +37,7 @@ The following NEW packages will be installed:
apt
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
After this operation, 5370 kB of additional disk space will be used.
-Get:1 http://localhost/ apt 0.7.25.3
+Get:1 http://localhost:8080/ apt 0.7.25.3
Download complete and in download only mode' aptget install apt -dy
}
@@ -50,7 +50,7 @@ The following NEW packages will be installed:
apt
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
After this operation, 5808 kB of additional disk space will be used.
-Get:1 http://localhost/ apt 0.8.0~pre1
+Get:1 http://localhost:8080/ apt 0.8.0~pre1
Download complete and in download only mode' aptget install apt -dy
}
diff --git a/test/libapt/uri_test.cc b/test/libapt/uri_test.cc
index 99bb3067e..16fde503f 100644
--- a/test/libapt/uri_test.cc
+++ b/test/libapt/uri_test.cc
@@ -108,5 +108,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;
}