]>
git.saurik.com Git - apt-legacy.git/blob - test/uri.cc
1 #include <apt-pkg/strutl.h>
4 void Test(const char *Foo
)
8 printf("%s a='%s' u='%s' p='%s' port='%u'\n h='%s' p='%s'\n",
9 Foo
,U
.Access
.c_str(),U
.User
.c_str(),U
.Password
.c_str(),
10 U
.Port
,U
.Host
.c_str(),U
.Path
.c_str());
16 Test("http://www.debian.org:90/temp/test");
17 Test("http://jgg:foo@ualberta.ca/blah");
18 Test("file:/usr/bin/foo");
19 Test("cdrom:Moo Cow Rom:/debian");
20 Test("gzip:./bar/cow");
23 Test("http://[1080::8:800:200C:417A]/foo");
24 Test("http://[::FFFF:129.144.52.38]:80/index.html");
25 Test("http://[::FFFF:129.144.52.38:]:80/index.html");
26 Test("http://[::FFFF:129.144.52.38:]/index.html");
28 /* My Evil Corruption of RFC 2732 to handle CDROM names! Fun for
30 Test("cdrom:[The Debian 1.2 disk, 1/2 R1:6]/debian/");
31 Test("cdrom:Foo Bar Cow/debian/");
33 Test("ftp:ftp.fr.debian.org/debian/pool/main/x/xtel/xtel_3.2.1-15_i386.deb");