From 66abbed5e08370412b81be1628590898ceeeb604 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 29 May 2021 19:05:31 +0900 Subject: Renaming of files in preparation for code style tools. Signed-off-by: Michele Calgaro --- tests/testaddress.cpp | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 tests/testaddress.cpp (limited to 'tests/testaddress.cpp') diff --git a/tests/testaddress.cpp b/tests/testaddress.cpp new file mode 100644 index 0000000..c24101d --- /dev/null +++ b/tests/testaddress.cpp @@ -0,0 +1,106 @@ +/* testaddresses KPilot +** +** Copyright (C) 2006 by Adriaan de Groot +#include +#include +#include +#include + +#include "pilot.h" +#include "pilotAddress.h" +#include "pilotLocalDatabase.h" + +static const TDECmdLineOptions options[] = +{ + {"verbose", "Verbose output", 0}, + {"data-dir ","Set data directory", "."}, + TDECmdLineLastOption +}; + + + +int main(int argc, char **argv) +{ + TDEApplication::disableAutoDcopRegistration(); + + TDEAboutData aboutData("testaddress","Test Addresses","0.1"); + TDECmdLineArgs::init(argc,argv,&aboutData); + TDECmdLineArgs::addCmdLineOptions( options ); + + TDEApplication app( false, false ); + + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); + +#ifdef DEBUG + debug_level= (args->isSet("verbose")) ? 4 : 0; +#endif + TQString datadir = args->getOption("data-dir"); + + DEBUGKPILOT << "### testaddresses\n#\n#" << endl; + + Pilot::setupPilotCodec( CSL1("Latin1") ); + + PilotLocalDatabase db( datadir, "AddressDB" ); + PilotAddressInfo appinfo( &db ); + + appinfo.dump(); + + for (unsigned int i=0; i