]> git.sesse.net Git - xml-template/blobdiff - c++0x/passthru.cpp
Add a passthru test for C++0x.
[xml-template] / c++0x / passthru.cpp
diff --git a/c++0x/passthru.cpp b/c++0x/passthru.cpp
new file mode 100644 (file)
index 0000000..2db2e3d
--- /dev/null
@@ -0,0 +1,22 @@
+#include <stdio.h>
+#include <string.h>
+#include <libxml/parser.h>
+
+#include "xml-template.h"
+
+using namespace std;
+
+int main(int argc, char **argv)
+{
+       LIBXML_TEST_VERSION
+
+       unordered_map<string, Directive*> master_map;
+
+       xmlDocPtr doc = xmlParseFile("../xml/passthru.xml");
+       Substitute(master_map).process(xmlDocGetRootElement(doc), false);
+       xmlSaveFile(argv[1], doc);
+
+       xmlCleanupParser();
+       xmlMemoryDump();
+       return(0);
+}