diff options
author | Michael Vogt <mvo@debian.org> | 2014-03-14 09:02:44 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2014-03-14 09:02:44 +0100 |
commit | 83b880c6505a20247239d897b7387bba37942993 (patch) | |
tree | 11a23275548175e301f6fefda20a6a8bb6fe6de8 /test/interactive-helper/testdeb.cc | |
parent | f98d9bd2adf4f24a72d973f5752b47987843984c (diff) | |
parent | 40f8a8ba8c2e7ff9ce80781250c863c07ac130dd (diff) |
fix test/integration/test-apt-helper
Diffstat (limited to 'test/interactive-helper/testdeb.cc')
-rw-r--r-- | test/interactive-helper/testdeb.cc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/test/interactive-helper/testdeb.cc b/test/interactive-helper/testdeb.cc index d28f20114..6aae9f563 100644 --- a/test/interactive-helper/testdeb.cc +++ b/test/interactive-helper/testdeb.cc @@ -1,15 +1,22 @@ +#include <config.h> + #include <apt-pkg/dirstream.h> #include <apt-pkg/debfile.h> #include <apt-pkg/error.h> #include <apt-pkg/extracttar.h> +#include <apt-pkg/arfile.h> +#include <apt-pkg/fileutl.h> + +#include <iostream> +#include <string> class NullStream : public pkgDirStream { public: - virtual bool DoItem(Item &Itm,int &Fd) {return true;}; + virtual bool DoItem(Item &/*Itm*/, int &/*Fd*/) {return true;}; }; -bool Test(const char *File) +static bool Test(const char *File) { FileFd Fd(File,FileFd::ReadOnly); debDebFile Deb(Fd); @@ -33,6 +40,11 @@ bool Test(const char *File) int main(int argc, const char *argv[]) { + if (argc != 2) { + std::cout << "One parameter expected - given " << argc << std::endl; + return 100; + } + Test(argv[1]); _error->DumpErrors(); return 0; |