]> git.sesse.net Git - xml-template/commitdiff
Add c++0x to test suite.
authorsgunderson@bigfoot.com <>
Wed, 21 Sep 2011 19:38:20 +0000 (21:38 +0200)
committersgunderson@bigfoot.com <>
Wed, 21 Sep 2011 19:38:20 +0000 (21:38 +0200)
c++0x/simple.cpp
tests/test.sh

index 05c7ea64f6ad4a49338412173c8814c2d65ec290..cfc504181d25584d906fb61b922918ca15152bc1 100644 (file)
@@ -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();
index 3b281158f06c1bd37d2266d8ccd5bf8d256d73c9..9433d173b72355cd37a86e34780054086e999094 100755 (executable)
@@ -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