diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-07-03 13:06:12 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-07-03 13:06:12 +0300 |
commit | bf635078e2e50fb5a11e0ff1937007f1fec3beda (patch) | |
tree | 5001e33e32cf97fabaa4eb453604d12822e1f08b /src/ellinika/tests/conj-test | |
parent | 8149debbf20b0f2b094fc2087455e6ab57f6c29f (diff) | |
download | ellinika-bf635078e2e50fb5a11e0ff1937007f1fec3beda.tar.gz ellinika-bf635078e2e50fb5a11e0ff1937007f1fec3beda.tar.bz2 |
Add conjugations samples.
Diffstat (limited to 'src/ellinika/tests/conj-test')
-rwxr-xr-x | src/ellinika/tests/conj-test | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/ellinika/tests/conj-test b/src/ellinika/tests/conj-test new file mode 100755 index 0000000..fbacae1 --- /dev/null +++ b/src/ellinika/tests/conj-test | |||
@@ -0,0 +1,39 @@ | |||
1 | #! /bin/sh | ||
2 | |||
3 | testdir=conj.dir | ||
4 | failures=0 | ||
5 | |||
6 | testcon() { | ||
7 | if guile -s conj/$1.scm | diff -pu samples/$1 - > $testdir/$1.diff | ||
8 | then | ||
9 | status=PASS | ||
10 | rm $testdir/$1.diff | ||
11 | else | ||
12 | status=FAIL | ||
13 | failures=1 | ||
14 | fi | ||
15 | echo "$1: $status" | ||
16 | } | ||
17 | |||
18 | if ! test -d $testdir; then | ||
19 | mkdir $testdir || exit 2 | ||
20 | fi | ||
21 | |||
22 | if test $# -gt 0; then | ||
23 | for verb in $* | ||
24 | do | ||
25 | testcon $verb | ||
26 | done | ||
27 | else | ||
28 | find samples -type f -printf '%f\n' | | ||
29 | while read verb | ||
30 | do | ||
31 | testcon $verb | ||
32 | done | ||
33 | fi | ||
34 | |||
35 | if test $failures -eq 0; then | ||
36 | rmdir $testdir | ||
37 | fi | ||
38 | |||
39 | exit $failures | ||