Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-04-22 23:42:44 +0300
committerJunio C Hamano <gitster@pobox.com>2020-04-22 23:42:44 +0300
commit7a8e6305d8d76df7551de8be2d5732c2ac3248b9 (patch)
tree9d4e81973e7201058cb9bf1f0abb2bbdf27eb554 /t/t5801-remote-helpers.sh
parent810dc6481ad7c1e1a6aacebfeaed308778c6c63f (diff)
parentec8f87b8eb5304c7cffa8b76838ad96850cf0e55 (diff)
Merge branch 'dl/test-must-fail-fixes-3'
Test clean-up continues. * dl/test-must-fail-fixes-3: t5801: teach compare_refs() to accept ! t5612: stop losing return codes of git commands t5612: don't use `test_must_fail test_cmp` t5607: reorder `nongit test_must_fail` t5550: simplify no matching line check t5512: stop losing return codes of git commands t5512: stop losing git exit code in here-docs t5512: don't use `test_must_fail test_cmp`
Diffstat (limited to 't/t5801-remote-helpers.sh')
-rwxr-xr-xt/t5801-remote-helpers.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh
index 121e5c6edb..0f04b6cddb 100755
--- a/t/t5801-remote-helpers.sh
+++ b/t/t5801-remote-helpers.sh
@@ -11,9 +11,15 @@ test_description='Test remote-helper import and export commands'
PATH="$TEST_DIRECTORY/t5801:$PATH"
compare_refs() {
+ fail= &&
+ if test "x$1" = 'x!'
+ then
+ fail='!' &&
+ shift
+ fi &&
git --git-dir="$1/.git" rev-parse --verify $2 >expect &&
git --git-dir="$3/.git" rev-parse --verify $4 >actual &&
- test_cmp expect actual
+ eval $fail test_cmp expect actual
}
test_expect_success 'setup repository' '
@@ -189,7 +195,7 @@ test_expect_success GPG 'push signed tag' '
git push origin signed-tag
) &&
compare_refs local signed-tag^{} server signed-tag^{} &&
- test_must_fail compare_refs local signed-tag server signed-tag
+ compare_refs ! local signed-tag server signed-tag
'
test_expect_success GPG 'push signed tag with signed-tags capability' '