summaryrefslogtreecommitdiffabout
path: root/src/ellinika/tests/conj-test
authorSergey Poznyakoff <gray@gnu.org.ua>2011-07-03 10:06:12 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2011-07-03 10:06:12 (GMT)
commitbf635078e2e50fb5a11e0ff1937007f1fec3beda (patch) (side-by-side diff)
tree5001e33e32cf97fabaa4eb453604d12822e1f08b /src/ellinika/tests/conj-test
parent8149debbf20b0f2b094fc2087455e6ab57f6c29f (diff)
downloadellinika-bf635078e2e50fb5a11e0ff1937007f1fec3beda.tar.gz
ellinika-bf635078e2e50fb5a11e0ff1937007f1fec3beda.tar.bz2
Add conjugations samples.
Diffstat (limited to 'src/ellinika/tests/conj-test') (more/less context) (ignore whitespace changes)
-rwxr-xr-xsrc/ellinika/tests/conj-test39
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
--- a/dev/null
+++ b/src/ellinika/tests/conj-test
@@ -0,0 +1,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.