4 export PATH
="$PWD/bin:$PATH"
14 cd "$REPODIR" > /dev
/null
15 git init
2> /dev
/null
> /dev
/null
32 # usage: check_test <test number>
35 if [ ! -x "t-$1.sh" ]; then
36 echo "Test $1 does not exist or is not runnable" >&2
43 # usage: run_test <test number>
46 # We make sure we can handle space characters
47 # by including one in REPODIR.
48 export REPODIR
="/tmp/guilt reg.$RANDOM"
49 export LOGFILE
="/tmp/guilt.log.$RANDOM"
57 cd "$REPODIR" > /dev
/null
58 "$REG_DIR/t-$1.sh" 2>&1 > "$LOGFILE"
62 [ $?
-ne 0 ] && test_failed
63 diff -u "t-$1.out" "$LOGFILE" || test_failed
67 rm -rf "$REPODIR" "$LOGFILE"
72 echo "Usage: $0 [<testnum> [<testnum [<testnum [...]]]]"
79 run_test
`echo "$t" | sed -e 's/^t-//' -e 's/\.sh$//'`
91 echo "All tests completed."