summaryrefslogtreecommitdiff
path: root/t/test-lib-functions.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/test-lib-functions.sh')
-rw-r--r--t/test-lib-functions.sh19
1 files changed, 15 insertions, 4 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index 93c0338..8c44856 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -651,8 +651,7 @@ test_set_prereq () {
# test_unset_prereq()
!*)
;;
- # (Temporary?) whitelist of things we can't easily
- # pretend not to support
+ # List of things we can't easily pretend to not support
SYMLINKS)
;;
# Inspecting whether GIT_TEST_FAIL_PREREQS is on
@@ -795,7 +794,7 @@ test_verify_prereq () {
}
test_expect_failure () {
- test_start_
+ test_start_ "$@"
test "$#" = 3 && { test_prereq=$1; shift; } || test_prereq=
test "$#" = 2 ||
BUG "not 2 or 3 parameters to test-expect-failure"
@@ -803,6 +802,7 @@ test_expect_failure () {
export test_prereq
if ! test_skip "$@"
then
+ test -n "$test_skip_test_preamble" ||
say >&3 "checking known breakage of $TEST_NUMBER.$test_count '$1': $2"
if test_run_ "$2" expecting_failure
then
@@ -815,7 +815,7 @@ test_expect_failure () {
}
test_expect_success () {
- test_start_
+ test_start_ "$@"
test "$#" = 3 && { test_prereq=$1; shift; } || test_prereq=
test "$#" = 2 ||
BUG "not 2 or 3 parameters to test-expect-success"
@@ -823,6 +823,7 @@ test_expect_success () {
export test_prereq
if ! test_skip "$@"
then
+ test -n "$test_skip_test_preamble" ||
say >&3 "expecting success of $TEST_NUMBER.$test_count '$1': $2"
if test_run_ "$2"
then
@@ -1782,6 +1783,16 @@ test_oid_to_path () {
echo "${1%$basename}/$basename"
}
+# Parse oids from git ls-files --staged output
+test_parse_ls_files_stage_oids () {
+ awk '{print $2}' -
+}
+
+# Parse oids from git ls-tree output
+test_parse_ls_tree_oids () {
+ awk '{print $3}' -
+}
+
# 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 () {