File: RunTests

package info (click to toggle)
pmw 1%3A4.28-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,908 kB
  • ctags: 2,631
  • sloc: ansic: 26,206; makefile: 331; sh: 255
file content (35 lines) | stat: -rwxr-xr-x 852 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
35
#! /bin/sh

/bin/rm -f test.*
/bin/rm -f test-*

rc=0

for x in infiles/* ; do
  file=`basename $x`
  ../src/pmw -F ../fontmetrics -H ../PSheader -MF ../psfonts \
    -includefont -o test.ps infiles/$file

  # These two commands cause warnings on Linux because you are supposed to
  # use "-n +4" instead, but -n isn't supported by Solaris' "tail".  
  # tail +4 test.ps >test.ps.3
  # tail +4 outfiles/$file.ps >test.out.3
  
  # So we do it this rather contorted way instead
  (head -n 3 >/dev/null; cat >test.ps.3) <test.ps
  (head -n 3 >/dev/null; cat >test.out.3) <outfiles/$file.ps 
 
  diff -u test.ps.3 test.out.3 >test.diff 
  if [ $? != 0 ] ; then
    mv test.diff test-$file.diff 
    echo "*** $file test failed - see test-$file.diff ***"
    rc=1 
  else
    echo $file test succeeded
  fi         
done   

/bin/rm test.*
exit $rc

# End