]> git.saurik.com Git - apt.git/blobdiff - test/scratch.cc
Sync
[apt.git] / test / scratch.cc
diff --git a/test/scratch.cc b/test/scratch.cc
new file mode 100644 (file)
index 0000000..577ab5f
--- /dev/null
@@ -0,0 +1,22 @@
+#include <apt-pkg/acquire-item.h>
+#include <apt-pkg/init.h>
+#include <apt-pkg/error.h>
+
+int main()
+{
+   pkgInitialize(*_config);
+   
+   pkgSourceList List;
+   pkgAcquire Fetcher;
+   List.ReadMainList();
+   
+   pkgSourceList::const_iterator I;
+   for (I = List.begin(); I != List.end(); I++)
+   {
+      new pkgAcqIndex(&Fetcher,I);
+      if (_error->PendingError() == true)
+        break;
+   }
+   
+   _error->DumpErrors();
+}