From 213b88053da331adf07b89ce35c8eb9cff914be4 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Aug 2011 09:59:19 +0200 Subject: merge the tests for configuration into another libapt-test --- test/conf.cc | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 test/conf.cc (limited to 'test/conf.cc') 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 -#include - -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; -} -- cgit v1.2.3