#!/bin/sh DIR=`pwd` TESTS="count1 countnode1 c14n1 c14n2 delete1 dtd1 dtd2 dtd3 elem1 elem2 elem3 escape1 exslt1 findfile1 genxml1 hello1 localname1 look1 move1 noindent1 ns1 recover1 rename-attr1 rename-elem1 schema1 sel1 sort1 structure1 sum1 tab1 table1 table2 table3 update-attr1 unicode1 update-elem1 valid1 xinclude1 xsl-param1 xsl-sum1" cd ../examples for i in $TESTS do ./${i} | tr -d "\r" > /tmp/xmlstarlet.$$ 2>/dev/null diff /tmp/xmlstarlet.$$ results/${i}.out >/dev/null 2>&1 if [ $? != "0" ] then echo "test $i - FAILED" else echo "test $i - success" fi rm -f /tmp/xmlstarlet.$$ done cd ${DIR}