File: invalid.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 (34 lines) | stat: -rwxr-xr-x 940 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
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh

err_count=0
for j in ibm/invalid/*/*.xml; do
  i="`echo "$j"|sed -e s:^ibm/::`"
  if test ! -d test-output/`dirname "$i"`; then
    mkdir test-output/`dirname "$i"`
  fi
  
  rm -f test-output/$i test-output/$i.err
  if test "$i" == "invalid/P32/ibm32i02.xml"; then
    echo "skipping: $i [refers to non-declared entity if not following external references]"
  elif $TEST_PROG -i "$j" >test-output/$i 2>test-output/$i.err; then
      echo "ok: $i [wf]"
  else
      err_count=`expr $err_count + 1`
      echo "failed: $i [wf] (exit code is non-zero)"
  fi

  if $TEST_PROG -v "$j" >test-output/$i 2>test-output/$i.err; then
    err_count=`expr $err_count + 1`
    echo "failed: $i [valid] (exit code is zero)"
  else
    if $DIFF "reference/$i.err" test-output/$i.err; then
      echo "ok: $i [valid]"
    else
      err_count=`expr $err_count + 1`
      echo "failed: $i [valid]"
    fi
  fi
done

test $err_count = "0"
exit $?