summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c3be114)
raw | patch | inline | side by side (parent: c3be114)
author | ishmal <ishmal@users.sourceforge.net> | |
Mon, 29 May 2006 01:02:00 +0000 (01:02 +0000) | ||
committer | ishmal <ishmal@users.sourceforge.net> | |
Mon, 29 May 2006 01:02:00 +0000 (01:02 +0000) |
src/pedro/work/test.cpp | patch | blob | history |
index be0676ebc121af215a09068b3ea19979f8532a79..f822ceca9148e3f12e5061b7fd308d378b130a78 100644 (file)
--- a/src/pedro/work/test.cpp
+++ b/src/pedro/work/test.cpp
#include <stdio.h>
#include "pedroxmpp.h"
+#include "pedroconfig.h"
//########################################################################
//# T E S T
return true;
}
+
+bool configTest()
+{
+ printf("#################################\n");
+ printf("## C o n f i g t e s t\n");
+ printf("#################################\n");
+
+ Pedro::XmppConfig config;
+
+ if (!config.readFile("pedro.ini"))
+ {
+ printf("could not read config file\n");
+ return false;
+ }
+
+ Pedro::DOMString str = config.toXmlBuffer();
+
+ printf("#################################\n");
+ printf("%s\n", str.c_str());
+
+ if (!config.writeFile("pedro2.ini"))
+ {
+ printf("could not write config file\n");
+ return false;
+ }
+
+
+ return true;
+
+};
+
+
+
int main(int argc, char **argv)
{
- if (!doTest())
+ if (!configTest())
return 1;
return 0;
}