File: runTests

package info (click to toggle)
xmlstarlet 1.0.0-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,036 kB
  • ctags: 383
  • sloc: ansic: 4,500; sh: 3,109; xml: 1,821; makefile: 95
file content (23 lines) | stat: -rwxr-xr-x 651 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/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}