summaryrefslogtreecommitdiff
path: root/t/lib-merge.sh
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2020-10-26 17:01:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-10-26 19:31:23 (GMT)
commitf06481f12732e846c0572a0109e2c5b5684f508a (patch)
treed757e3872eac53647d2c0f100de08763189ae8b8 /t/lib-merge.sh
parentc64432aacda9054459ce550eca95929897c301bd (diff)
downloadgit-f06481f12732e846c0572a0109e2c5b5684f508a.zip
git-f06481f12732e846c0572a0109e2c5b5684f508a.tar.gz
git-f06481f12732e846c0572a0109e2c5b5684f508a.tar.bz2
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>
Diffstat (limited to 't/lib-merge.sh')
-rw-r--r--t/lib-merge.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/lib-merge.sh b/t/lib-merge.sh
new file mode 100644
index 0000000..8734ebf
--- /dev/null
+++ b/t/lib-merge.sh
@@ -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
+}