summaryrefslogtreecommitdiffstats
path: root/src/pedro/work/test.cpp
diff options
context:
space:
mode:
authorBob Jamison <ishmalius@gmail.com>2006-05-29 01:02:00 +0000
committerishmal <ishmal@users.sourceforge.net>2006-05-29 01:02:00 +0000
commitae86bd9500d35927539873b5fa09a70022072dd8 (patch)
tree9f267da50b4e16c26af4bc85d1022d75c56c1497 /src/pedro/work/test.cpp
parenttypos, mnemonics (diff)
downloadinkscape-ae86bd9500d35927539873b5fa09a70022072dd8.tar.gz
inkscape-ae86bd9500d35927539873b5fa09a70022072dd8.zip
add test for config
(bzr r1050)
Diffstat (limited to 'src/pedro/work/test.cpp')
-rw-r--r--src/pedro/work/test.cpp36
1 files changed, 35 insertions, 1 deletions
diff --git a/src/pedro/work/test.cpp b/src/pedro/work/test.cpp
index be0676ebc..f822ceca9 100644
--- a/src/pedro/work/test.cpp
+++ b/src/pedro/work/test.cpp
@@ -3,6 +3,7 @@
#include <stdio.h>
#include "pedroxmpp.h"
+#include "pedroconfig.h"
//########################################################################
//# T E S T
@@ -140,9 +141,42 @@ bool doTest()
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;
}