summaryrefslogtreecommitdiffabout
path: root/src/ellinika/tests/conj-test
blob: fbacae128e8833d683a02574d4fa82035444ac06 (plain)
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
36
37
38
39
#! /bin/sh

testdir=conj.dir
failures=0

testcon() {
	if guile -s conj/$1.scm | diff -pu samples/$1 - > $testdir/$1.diff
	then
	  status=PASS
	  rm $testdir/$1.diff
	else
	  status=FAIL
	  failures=1
	fi
	echo "$1: $status"
}

if ! test -d $testdir; then
  mkdir $testdir || exit 2
fi

if test $# -gt 0; then
  for verb in $*
  do
    testcon $verb
  done
else
  find samples -type f -printf '%f\n' |
    while read verb
    do
      testcon $verb
    done
fi

if test $failures -eq 0; then
  rmdir $testdir
fi

exit $failures

Return to:

Send suggestions and report system problems to the System administrator.