summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/scratch.cc25
1 files changed, 12 insertions, 13 deletions
diff --git a/test/scratch.cc b/test/scratch.cc
index de306e802..dc02e059a 100644
--- a/test/scratch.cc
+++ b/test/scratch.cc
@@ -1,22 +1,21 @@
-#include <apt-pkg/acquire-item.h>
-#include <apt-pkg/acquire-worker.h>
-#include <apt-pkg/init.h>
-#include <apt-pkg/error.h>
-#include <strutl.h>
+#include <apt-pkg/tagfile.h>
#include <signal.h>
#include <stdio.h>
int main(int argc,char *argv[])
{
-
- URI Foo(argv[1]);
- cout << Foo.Access << '\'' << endl;
- cout << Foo.Host << '\'' << endl;
- cout << Foo.Path << '\'' << endl;
- cout << Foo.User << '\'' << endl;
- cout << Foo.Password << '\'' << endl;
- cout << Foo.Port << endl;
+ FileFd F(argv[1],FileFd::ReadOnly);
+ pkgTagFile Reader(F);
+
+ pkgTagSection Sect;
+ while (Reader.Step(Sect) == true)
+ {
+ Sect.FindS("Package");
+ Sect.FindS("Section");
+ Sect.FindS("Version");
+ Sect.FindI("Size");
+ };
return 0;
}