t/: new helper for tests that pass with ort but fail with recursive

There are a number of tests that the "recursive" backend does not handle
correctly but which the redesign in "ort" will.  Add a new helper in
lib-merge.sh for selecting a different test expectation based on the
setting of GIT_TEST_MERGE_ALGORITHM, and use it in various testcases to
document which ones we expect to fail under recursive but pass under
ort.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Elijah Newren
2020-10-26 17:01:36 +00:00
committed by Junio C Hamano
parent c64432aacd
commit f06481f127
6 changed files with 34 additions and 16 deletions

13
t/lib-merge.sh Normal file
View File

@ -0,0 +1,13 @@
# Helper functions used by merge tests.
test_expect_merge_algorithm () {
status_for_recursive=$1 status_for_ort=$2
shift 2
if test "$GIT_TEST_MERGE_ALGORITHM" = ort
then
test_expect_${status_for_ort} "$@"
else
test_expect_${status_for_recursive} "$@"
fi
}