]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/test-lib-functions.sh
Merge branch 'js/doc-patch-text'
[thirdparty/git.git] / t / test-lib-functions.sh
index 48bd3b467d3f32b7a8fda26a7ff04114afde5aa4..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"
@@ -1433,7 +1433,8 @@ test_oid () {
 # 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 () {
-       echo "${1%${1#??}}/${1#??}"
+       local basename=${1#??}
+       echo "${1%$basename}/$basename"
 }
 
 # Choose a port number based on the test script's number and store it in