projects
/
apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
not all targets are deb-src targets
[apt.git]
/
test
/
interactive-helper
/
testdeb.cc
diff --git
a/test/interactive-helper/testdeb.cc
b/test/interactive-helper/testdeb.cc
index d28f20114fa1516170a352218ca2c74e31ddbe96..69e1ffe0b598e5c415b921c5868e992643613a53 100644
(file)
--- 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/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:
class NullStream : public pkgDirStream
{
public:
- virtual bool DoItem(Item &
Itm,int &Fd)
{return true;};
+ virtual bool DoItem(Item &
/*Itm*/, int &/*Fd*/) APT_OVERRIDE
{return true;};
};
};
-bool Test(const char *File)
+
static
bool Test(const char *File)
{
FileFd Fd(File,FileFd::ReadOnly);
debDebFile Deb(Fd);
{
FileFd Fd(File,FileFd::ReadOnly);
debDebFile Deb(Fd);
@@
-33,6
+40,11
@@
bool Test(const char *File)
int main(int argc, const char *argv[])
{
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;
Test(argv[1]);
_error->DumpErrors();
return 0;