File: abs2rel.sh

package info (click to toggle)
libooc-xml 3.0-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 10,880 kB
  • ctags: 360
  • sloc: xml: 10,312; ansic: 1,681; sh: 798; makefile: 301; perl: 17
file content (23 lines) | stat: -rwxr-xr-x 556 bytes parent folder | download | duplicates (2)
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

count=0
err_count=0
for i in abs2rel/*.txt; do
  rm -f test-output/$i
  test_uri=`grep "^TEST	" $i | sed -e "s/^TEST	//g"`
  base_uri=`grep "^BASE	" $i | sed -e "s/^BASE	//g"`
  if $TEST_PROG "$test_uri" "$base_uri" abs2rel >test-output/$i; then
    if $DIFF "`dirname $i`/out-xml/`basename $i`" test-output/$i; then
      echo "ok: $i"
    else
      err_count=`expr $err_count + 1`
      echo "failed: $i"
    fi
  else
    err_count=`expr $err_count + 1`
    echo "failed: $i (exit code is non-zero)"
  fi
done

test $err_count = "0"
exit $?