summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am4
-rwxr-xr-xtestit.sh13
2 files changed, 11 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am
index 7c0679f..c209223 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,7 +3,9 @@
AUTOMAKE_OPTIONS = 1.4 foreign
EXTRA_DIST = autogen.sh CHANGES $(man_MANS) popt.spec \
- testit.sh po/Makefile.in.in po/POTFILES.in po/*.po po/popt.pot popt.ps
+ testit.sh test-poptrc \
+ po/Makefile.in.in po/POTFILES.in po/sk.po po/ro.po po/popt.pot \
+ popt.ps
SUBDIRS = intl po
diff --git a/testit.sh b/testit.sh
index fdb1541..e9b7198 100755
--- a/testit.sh
+++ b/testit.sh
@@ -1,7 +1,5 @@
#!/bin/sh
-${test1:=./test1}
-
run() {
prog=$1; shift
name=$1; shift
@@ -9,14 +7,19 @@ run() {
echo Running test $name.
- result=`./$prog $*`
+ result=`$builddir/$prog $*`
if [ "$answer" != "$result" ]; then
- echo "Test \"$*\" failed with: $result"
+ echo "Test \"$*\" failed with: \"$result\" != \"$answer\" "
exit 2
fi
}
-make -q testcases
+builddir=`pwd`
+cd ${srcdir}
+test1=${builddir}/test1
+echo "Running tests in `pwd`"
+
+#make -q testcases
run test1 "test1 - 1" "arg1: 1 arg2: (none)" --arg1
run test1 "test1 - 2" "arg1: 0 arg2: foo" --arg2 foo