pack-objects: drop packlist index_pos optimization
[gitweb.git] / t / test-lib-functions.sh
index d4f199391f1abe839e55d5abab8a9476fbfc1d35..87bf3a2287381be4586eccd94cce35c0a3b3d60f 100644 (file)
@@ -580,7 +580,7 @@ test_expect_failure () {
        export test_prereq
        if ! test_skip "$@"
        then
-               say >&3 "checking known breakage: $2"
+               say >&3 "checking known breakage of $TEST_NUMBER.$test_count '$1': $2"
                if test_run_ "$2" expecting_failure
                then
                        test_known_broken_ok_ "$1"
@@ -600,7 +600,7 @@ test_expect_success () {
        export test_prereq
        if ! test_skip "$@"
        then
-               say >&3 "expecting success: $2"
+               say >&3 "expecting success of $TEST_NUMBER.$test_count '$1': $2"
                if test_run_ "$2"
                then
                        test_ok_ "$1"
@@ -1430,6 +1430,13 @@ test_oid () {
        eval "printf '%s' \"\${$var}\""
 }
 
+# Insert a slash into an object ID so it can be used to reference a location
+# under ".git/objects".  For example, "deadbeef..." becomes "de/adbeef..".
+test_oid_to_path () {
+       local basename=${1#??}
+       echo "${1%$basename}/$basename"
+}
+
 # Choose a port number based on the test script's number and store it in
 # the given variable name, unless that variable already contains a number.
 test_set_port () {