From d171b609042def06f57f4c7cabbee391a3611265 Mon Sep 17 00:00:00 2001 From: "sgunderson@bigfoot.com" <> Date: Thu, 22 Sep 2011 00:41:54 +0200 Subject: [PATCH] Add namespace test for C++0x. Segfaults currently. --- c++0x/Makefile | 3 +++ c++0x/namespace.cpp | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 c++0x/namespace.cpp diff --git a/c++0x/Makefile b/c++0x/Makefile index ee41b66..f3c0dc4 100644 --- a/c++0x/Makefile +++ b/c++0x/Makefile @@ -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 index 0000000..7298576 --- /dev/null +++ b/c++0x/namespace.cpp @@ -0,0 +1,19 @@ +#include + +#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); +} -- 2.39.2