From 024835dca750b828b593e71fc80ffcb87edafb4f Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:51:07 +0000 Subject: Sync Author: jgg Date: 1998-10-20 02:41:03 GMT Sync --- test/makefile | 12 ++++++++++++ test/scratch.cc | 22 ++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 test/makefile create mode 100644 test/scratch.cc (limited to 'test') diff --git a/test/makefile b/test/makefile new file mode 100644 index 000000000..299389873 --- /dev/null +++ b/test/makefile @@ -0,0 +1,12 @@ +# -*- make -*- +BASE=.. +SUBDIR=test + +# Bring in the default rules +include ../buildlib/defaults.mak + +# Scratch program to test incomplete code fragments in +PROGRAM=scratch-test +SLIBS = -lapt-pkg +SOURCE = scratch.cc +include $(PROGRAM_H) diff --git a/test/scratch.cc b/test/scratch.cc new file mode 100644 index 000000000..577ab5f9b --- /dev/null +++ b/test/scratch.cc @@ -0,0 +1,22 @@ +#include +#include +#include + +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(); +} -- cgit v1.2.3