]> git.sesse.net Git - xml-template/commitdiff
Add namespace test for C++0x. Segfaults currently.
authorsgunderson@bigfoot.com <>
Wed, 21 Sep 2011 22:41:54 +0000 (00:41 +0200)
committersgunderson@bigfoot.com <>
Wed, 21 Sep 2011 22:41:54 +0000 (00:41 +0200)
c++0x/Makefile
c++0x/namespace.cpp [new file with mode: 0644]

index ee41b660a1d5badeba31ae545166ed6c3ab4e61e..f3c0dc4e3bcd055d5640350346a2e18a3d2adab0 100644 (file)
@@ -14,3 +14,6 @@ clone: clone.o $(LIBS)
 
 attribute: attribute.o $(LIBS)
        $(CXX) -o $@ $< $(LIBS) $(LDFLAGS)
+
+namespace: namespace.o $(LIBS)
+       $(CXX) -o $@ $< $(LIBS) $(LDFLAGS)
diff --git a/c++0x/namespace.cpp b/c++0x/namespace.cpp
new file mode 100644 (file)
index 0000000..7298576
--- /dev/null
@@ -0,0 +1,19 @@
+#include <stdio.h>
+
+#include "xml-template.h"
+
+using namespace std;
+
+int main(int argc, char **argv)
+{
+       Substitute master_directive = {
+               make_pair("title", new Replace("Namespace tests")),
+               make_pair("#hello", new Replace("Hello world!")),
+               make_pair("#test", new Replace("Replaced.")),
+               make_pair("tagname", new Replace("foo")),
+               make_pair("#moretest", new Replace("bar")),
+       };
+
+       process_file("../xml/namespace.xml", argv[1], &master_directive);
+       return(0);
+}