4 export PATH
="$PWD/bin:$PATH"
14 cd $REPODIR > /dev
/null
15 git init
2> /dev
/null
> /dev
/null
31 # usage: check_test <test number>
34 if [ ! -x "t-$1.sh" ]; then
35 echo "Test $1 does not exist or is not runnable" >&2
42 # usage: run_test <test number>
45 export REPODIR
="/tmp/guilt.reg.$RANDOM"
46 export LOGFILE
="/tmp/guilt.log.$RANDOM"
54 cd $REPODIR > /dev
/null
55 "$REG_DIR/t-$1.sh" 2>&1 > "$LOGFILE"
59 [ $?
-ne 0 ] && test_failed
60 diff -u "t-$1.out" "$LOGFILE" || test_failed
64 rm -rf $REPODIR $LOGFILE
69 echo "Usage: $0 [<testnum> [<testnum [<testnum [...]]]]"
76 run_test
`echo "$t" | sed -e 's/^t-//' -e 's/\.sh$//'`
88 echo "All tests completed."