+#! /bin/sh
+
+TESTS="simple clone include attribute attribute2"
+LANGUAGES="perl php python"
+
+for L in $LANGUAGES; do
+ for T in $TESTS; do
+ echo -n "Testing $L/$T... "
+ TEMPFILE=$( tempfile )
+
+ if [ "$L" = "perl" ]; then
+ perl -I../perl ../perl/$T.pl > $TEMPFILE
+ fi
+ if [ "$L" = "php" ]; then
+ php4-cgi ../php/$T.php > $TEMPFILE
+ fi
+ if [ "$L" = "php" ]; then
+ python ../python/$T.py > $TEMPFILE
+ fi
+
+ ./xml-diff.pl reference/$T.xml 2>/dev/null
+ if [ $? = 0 ]; then
+ echo "passed."
+ else
+ echo "FAILED."
+ fi
+
+ rm -f $TEMPFILE
+ done
+done
+