4 export PATH
="$PWD/bin:$PATH"
13 cd $REPODIR > /dev
/null
14 git-init-db
2> /dev
/null
> /dev
/null
30 # usage: check_test <test number>
33 if [ ! -x "t-$1.sh" ]; then
34 echo "Test $1 does not exist or is not runnable" >&2
41 # usage: run_test <test number>
44 export REPODIR
="/tmp/guilt.reg.$RANDOM"
45 export LOGFILE
="/tmp/guilt.log.$RANDOM"
53 cd $REPODIR > /dev
/null
54 "$REG_DIR/t-$1.sh" 2>&1 > "$LOGFILE"
58 [ $?
-ne 0 ] && test_failed
59 diff -u "t-$1.out" "$LOGFILE" || test_failed
63 rm -rf $REPODIR $LOGFILE
68 echo "Usage: $0 [<testnum> [<testnum [<testnum [...]]]]"
75 run_test
`echo "$t" | sed -e 's/^t-//' -e 's/\.sh$//'`
87 echo "All tests completed."