X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=tests%2Ftest.sh;h=bf92fca9f74ed15c64322361eb3208cca3724024;hb=HEAD;hp=b03a657dd8aa076fb9193e2eff06873cbb804934;hpb=8829a2755096b018531a1d939e61b6a75d3be8a7;p=xml-template diff --git a/tests/test.sh b/tests/test.sh index b03a657..bf92fca 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -1,25 +1,43 @@ #! /bin/sh if [ -z "$TESTS" ]; then - TESTS="passthru simple clone include attribute attribute2 attribute-empty" + TESTS="passthru simple clone include attribute attribute2 attribute3 attribute-empty namespace namespace2 structure" fi if [ -z "$LANGUAGES" ]; then - LANGUAGES="perl php python" + LANGUAGES="perl perl-sax php4 php5 python python3 ruby c++11" fi for L in $LANGUAGES; do for T in $TESTS; do - printf "%-30s" "Testing $L/$T..." + printf "%-35s" "Testing $L/$T..." TEMPFILE=$( tempfile ) if [ "$L" = "perl" ]; then perl -I../perl ../perl/$T.pl > $TEMPFILE fi - if [ "$L" = "php" ]; then - php4-cgi -q ../php/$T.php > $TEMPFILE + if [ "$L" = "perl-sax" ]; then + perl -I../perl-sax ../perl-sax/$T.pl > $TEMPFILE + fi + if [ "$L" = "php4" ]; then + php4-cgi -q ../php4/$T.php > $TEMPFILE + fi + if [ "$L" = "php5" ]; then + php5-cgi -q ../php5/$T.php > $TEMPFILE + fi + if [ "$L" = "php7-swig" ]; then + ( cd ../c++11 && make -s && cd ../php7-swig && make -s && sudo cp XML_Template_SWIG.so /usr/lib/php/20151012 ) && php7-cgi -q ../php7-swig/$T.php > $TEMPFILE fi if [ "$L" = "python" ]; then - python ../python/$T.py > $TEMPFILE + python2 ../python/$T.py > $TEMPFILE + fi + if [ "$L" = "python3" ]; then + python3 ../python/$T.py > $TEMPFILE + fi + if [ "$L" = "ruby" ]; then + ruby -I../ruby ../ruby/$T.rb > $TEMPFILE + fi + if [ "$L" = "c++11" ]; then + ( cd ../c++11 && make -s $T ) && ../c++11/$T > $TEMPFILE fi perl ./xml-diff.pl $TEMPFILE reference/$T.xml