summaryrefslogtreecommitdiff
path: root/testit.sh
diff options
context:
space:
mode:
authorsopwith <sopwith>2000-02-11 04:44:14 +0000
committersopwith <sopwith>2000-02-11 04:44:14 +0000
commit2a3de46428fd597d1d5b87fc4f92fd570160850f (patch)
tree15594069f93b681935c85295b54300f2947909c2 /testit.sh
parent503fc84627ae8fadb67d61f4f4c98451abf11d8c (diff)
downloadlibpopt-2a3de46428fd597d1d5b87fc4f92fd570160850f.tar.gz
Makefile.am: Distribute test-poptrc, don't try to wildcard .po files.
testit.sh: Work with srcdir != builddir.
Diffstat (limited to 'testit.sh')
-rwxr-xr-xtestit.sh13
1 files changed, 8 insertions, 5 deletions
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