From 463ec2a071522ca887d1548bc1a5f01ed0263b01 Mon Sep 17 00:00:00 2001 From: "sgunderson@bigfoot.com" <> Date: Wed, 21 Sep 2011 21:38:20 +0200 Subject: [PATCH] Add c++0x to test suite. --- c++0x/simple.cpp | 4 ++-- tests/test.sh | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/c++0x/simple.cpp b/c++0x/simple.cpp index 05c7ea6..cfc5041 100644 --- a/c++0x/simple.cpp +++ b/c++0x/simple.cpp @@ -14,9 +14,9 @@ int main(int argc, char **argv) master_map.insert(make_pair("title", new Replace("A very basic example"))); master_map.insert(make_pair("#hello", new Replace("Hello world!"))); - xmlDocPtr doc = xmlParseFile(argv[1]); + xmlDocPtr doc = xmlParseFile("../xml/simple.xml"); Substitute(master_map).process(xmlDocGetRootElement(doc), false); - xmlSaveFile("out.xml", doc); + xmlSaveFile(argv[1], doc); xmlCleanupParser(); xmlMemoryDump(); diff --git a/tests/test.sh b/tests/test.sh index 3b28115..9433d17 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -4,7 +4,7 @@ if [ -z "$TESTS" ]; then TESTS="passthru simple clone include attribute attribute2 attribute3 attribute-empty namespace namespace2 structure" fi if [ -z "$LANGUAGES" ]; then - LANGUAGES="perl perl-sax php4 php5 python ruby" + LANGUAGES="perl perl-sax php4 php5 python ruby c++0x" fi for L in $LANGUAGES; do @@ -30,6 +30,9 @@ for L in $LANGUAGES; do if [ "$L" = "ruby" ]; then ruby -I../ruby ../ruby/$T.rb > $TEMPFILE fi + if [ "$L" = "c++0x" ]; then + ( cd ../c++0x && make $T ) && ../c++0x/$T $TEMPFILE + fi perl ./xml-diff.pl $TEMPFILE reference/$T.xml if [ $? = 0 ]; then -- 2.39.2