summaryrefslogtreecommitdiffstats
path: root/tdeabc/tests/testdb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdeabc/tests/testdb.cpp')
-rw-r--r--tdeabc/tests/testdb.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/tdeabc/tests/testdb.cpp b/tdeabc/tests/testdb.cpp
new file mode 100644
index 000000000..f7ec1d17c
--- /dev/null
+++ b/tdeabc/tests/testdb.cpp
@@ -0,0 +1,33 @@
+#include <tdeaboutdata.h>
+#include <tdeapplication.h>
+#include <kdebug.h>
+#include <tdelocale.h>
+#include <tdecmdlineargs.h>
+
+#include "addressbook.h"
+#include "vcardformat.h"
+#include "resourcesql.h"
+
+using namespace KABC;
+
+int main(int argc,char **argv)
+{
+ TDEAboutData aboutData("testdb","TestKabcDB","0.1");
+ TDECmdLineArgs::init(argc,argv,&aboutData);
+
+// TDEApplication app( false, false );
+ TDEApplication app;
+
+ AddressBook ab;
+
+ ResourceSql r( &ab, "root", "kde4ever", "localhost" );
+ if ( ! r.open() ) {
+ kdDebug() << "Failed to open resource." << endl;
+ }
+
+ r.load( &ab );
+
+ r.close();
+
+ ab.dump();
+}