From f4c20290509d7ed3a8fd5304577e7a4cc0b9d974 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 3 Apr 2007 03:49:53 +0000 Subject: Ok, no code is left in src, it's all in src/old. We'll gradually move code back into src as it's fixed and re-org'd. This includes tests, which, I may write a unit test system into libbu++ just to make my life easier. --- src/old/tests/xmlreadtest.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/old/tests/xmlreadtest.cpp (limited to 'src/old/tests/xmlreadtest.cpp') diff --git a/src/old/tests/xmlreadtest.cpp b/src/old/tests/xmlreadtest.cpp new file mode 100644 index 0000000..d061810 --- /dev/null +++ b/src/old/tests/xmlreadtest.cpp @@ -0,0 +1,29 @@ +#include "xmlfilereader.h" +#include "xmlstringreader.h" +#include "xmlfilewriter.h" + +int main( int argc, char *argv[] ) +{ + if( argc < 4 ) + { + printf("Usage: %s f \n", argv[0] ); + printf(" %s s \n\n", argv[0] ); + return 0; + } + + if( argv[1][0] == 'f' ) + { + XmlFileReader r( argv[2], true ); +// XmlFileWriter w( argv[3], "\t", r.detatchRoot() ); +// w.write(); + } + else if( argv[1][0] == 's' ) + { + XmlStringReader r( argv[2], true ); + XmlFileWriter w(stdout, "\t", r.detatchRoot() ); + w.write(); + } + + return 0; +} + -- cgit v1.2.3