Ignore also temporary files like COMMIT_EDITMSG, FETCH_HEAD, etc.
[gitgitconfig.git] / run-tests.sh
blob05342085c0fb1ebf6eaacb09bf541d97db6bcada
1 #!/bin/bash
3 readonly DATADIR="$(pwd)"
4 if [[ "$PATH" ]]; then
5 readonly PATH="$(pwd):$PATH"
6 else
7 readonly PATH="$(pwd)"
8 fi
9 export DATADIR PATH
11 for t in "$(pwd)"/tests/*.sh; do
12 echo -n "################################### "
13 echo "Running $(basename "$t")..."
14 mkdir "$TMP"/test-gitgitconfig
15 pushd "$TMP"/test-gitgitconfig
16 if "$t"; then echo OK; else echo FAILED; fi
17 popd
18 rm -rf "$TMP"/test-gitgitconfig
19 done