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/testdatebook.cpp | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 tests/testdatebook.cpp (limited to 'tests/testdatebook.cpp') diff --git a/tests/testdatebook.cpp b/tests/testdatebook.cpp new file mode 100644 index 0000000..82cc46a --- /dev/null +++ b/tests/testdatebook.cpp @@ -0,0 +1,95 @@ +/* testaddresses KPilot +** +** Copyright (C) 2006 by Adriaan de Groot +#include +#include +#include +#include + +#include "pilot.h" +#include "pilotDateEntry.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("testdatebook","Test Date Book","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 << "### testdatebook\n#\n#" << endl; + + Pilot::setupPilotCodec( CSL1("Latin1") ); + + PilotLocalDatabase db( datadir, "DatebookDB" ); + PilotDateInfo appinfo( &db ); + + for (unsigned int i=0; i