summaryrefslogtreecommitdiff
path: root/test/conf.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-09-14 13:22:19 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2011-09-14 13:22:19 +0200
commita0e07f3ec885c12c733c12805391646c202f3f31 (patch)
treefaa658f29d7dff42c6ed475037dd462384eab46e /test/conf.cc
parentb11fe392b2245354591296df88c3be2e6218af12 (diff)
parentafd7b358f94efddb83a2911ec1a21e7280074b1e (diff)
merged from lp:~donkult/apt/experimental
Diffstat (limited to 'test/conf.cc')
-rw-r--r--test/conf.cc37
1 files changed, 0 insertions, 37 deletions
diff --git a/test/conf.cc b/test/conf.cc
deleted file mode 100644
index 340647b5f..000000000
--- a/test/conf.cc
+++ /dev/null
@@ -1,37 +0,0 @@
-#include <apt-pkg/configuration.h>
-#include <apt-pkg/error.h>
-
-using namespace std;
-
-int main(int argc,const char *argv[])
-{
- Configuration Cnf;
-
- ReadConfigFile(Cnf,argv[1],true);
-
- // Process 'simple-key' type sections
- const Configuration::Item *Top = Cnf.Tree("simple-key");
- for (Top = (Top == 0?0:Top->Child); Top != 0; Top = Top->Next)
- {
- Configuration Block(Top);
-
- string VendorID = Top->Tag;
- string FingerPrint = Block.Find("Fingerprint");
- string Name = Block.Find("Name"); // Description?
-
- if (FingerPrint.empty() == true || Name.empty() == true)
- _error->Error("Block %s is invalid",VendorID.c_str());
-
- cout << VendorID << ' ' << FingerPrint << ' ' << Name << endl;
- }
-
- // Print any errors or warnings found during parsing
- if (_error->empty() == false)
- {
- bool Errors = _error->PendingError();
- _error->DumpErrors();
- return Errors == true?100:0;
- }
-
- return 0;
-}