summaryrefslogtreecommitdiff
path: root/test/interactive-helper/testdeb.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-06-12 08:36:58 +0200
committerMichael Vogt <mvo@debian.org>2014-06-12 08:36:58 +0200
commitcfc7f735774ba30dbee1897248f8dfedf0229a4c (patch)
treeb4e0ac29a6b398045a803e890f5cdabcca189d6a /test/interactive-helper/testdeb.cc
parenta0187f0f82a184b850b05b62e5a59b6a2055a506 (diff)
parent7701680af12a2c1a65121533c6ebcd635c013c25 (diff)
Merge tag '1.0.1ubuntu2' into ubuntu/trusty
Conflicts: configure.ac debian/changelog debian/control test/integration/framework
Diffstat (limited to 'test/interactive-helper/testdeb.cc')
-rw-r--r--test/interactive-helper/testdeb.cc16
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;