Merge branch 'maint-1.6.1' into maint-1.6.2
[gitweb.git] / t / test-lib.sh
index c1839f70b9dce20142dd0a4b50c999a6d4db5301..59d82d25e9ad586ff43a4a9485d348492fb36d19 100644 (file)
@@ -82,7 +82,7 @@ do
        -i|--i|--im|--imm|--imme|--immed|--immedi|--immedia|--immediat|--immediate)
                immediate=t; shift ;;
        -l|--l|--lo|--lon|--long|--long-|--long-t|--long-te|--long-tes|--long-test|--long-tests)
-               export GIT_TEST_LONG=t; shift ;;
+               GIT_TEST_LONG=t; export GIT_TEST_LONG; shift ;;
        -h|--h|--he|--hel|--help)
                help=t; shift ;;
        -v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
@@ -201,7 +201,7 @@ test_tick () {
 # Both <file> and <contents> default to <message>.
 
 test_commit () {
-       file=${2:-$(echo "$1" | tr 'A-Z' 'a-z')}
+       file=${2:-"$1.t"}
        echo "${3-$1}" > "$file" &&
        git add "$file" &&
        test_tick &&
@@ -466,14 +466,6 @@ test_done () {
        fi
        case "$test_failure" in
        0)
-               # We could:
-               # cd .. && rm -fr 'trash directory'
-               # but that means we forbid any tests that use their own
-               # subdirectory from calling test_done without coming back
-               # to where they started from.
-               # The Makefile provided will clean this test area so
-               # we will leave things as they are.
-
                say_color pass "passed all $msg"
 
                test -d "$remove_trash" &&