diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-08-17 12:06:37 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-08-17 12:06:37 +0200 |
commit | 369c919f2be8d2c93b990a97436b41ba4ae1ff29 (patch) | |
tree | 8f547c2705e5132fa7f775a1b9d7eca69f9c0840 /test/testdeb.cc | |
parent | 7c69574c5bec814cc3cb58701d2beccfe6093add (diff) |
move the interactive helper to a subdirectory of test
Diffstat (limited to 'test/testdeb.cc')
-rw-r--r-- | test/testdeb.cc | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/test/testdeb.cc b/test/testdeb.cc deleted file mode 100644 index d28f20114..000000000 --- a/test/testdeb.cc +++ /dev/null @@ -1,39 +0,0 @@ -#include <apt-pkg/dirstream.h> -#include <apt-pkg/debfile.h> -#include <apt-pkg/error.h> -#include <apt-pkg/extracttar.h> - -class NullStream : public pkgDirStream -{ - public: - virtual bool DoItem(Item &Itm,int &Fd) {return true;}; -}; - -bool Test(const char *File) -{ - FileFd Fd(File,FileFd::ReadOnly); - debDebFile Deb(Fd); - - if (_error->PendingError() == true) - return false; - - // Get the archive member and positition the file - const ARArchive::Member *Member = Deb.GotoMember("data.tar.gz"); - if (Member == 0) - return false; - - // Extract it. - ExtractTar Tar(Deb.GetFile(),Member->Size, "gzip"); - NullStream Dir; - if (Tar.Go(Dir) == false) - return false; - - return true; -} - -int main(int argc, const char *argv[]) -{ - Test(argv[1]); - _error->DumpErrors(); - return 0; -} |