diff options
Diffstat (limited to 't/t5411/test-0038-report-mixed-refs.sh')
-rw-r--r-- | t/t5411/test-0038-report-mixed-refs.sh | 84 |
1 files changed, 41 insertions, 43 deletions
diff --git a/t/t5411/test-0038-report-mixed-refs.sh b/t/t5411/test-0038-report-mixed-refs.sh index 0d071ebaa6..e63fe7ba11 100644 --- a/t/t5411/test-0038-report-mixed-refs.sh +++ b/t/t5411/test-0038-report-mixed-refs.sh @@ -24,56 +24,54 @@ test_expect_success "proc-receive: report update of mixed refs ($PROTOCOL)" ' HEAD:refs/heads/foo \ HEAD:refs/for/main/topic \ HEAD:refs/for/next/topic3 \ - >out 2>&1 && - make_user_friendly_and_stable_output <out >actual && - cat >expect <<-EOF && - remote: # pre-receive hook - remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main - remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/bar - remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/baz - remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2 - remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic1 - remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/foo - remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic - remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic3 - remote: # proc-receive hook - remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2 - remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic1 - remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic - remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic3 - remote: proc-receive> ok refs/for/next/topic2 - remote: proc-receive> ng refs/for/next/topic1 fail to call Web API - remote: proc-receive> ok refs/for/main/topic - remote: proc-receive> option refname refs/for/main/topic - remote: proc-receive> option old-oid <COMMIT-A> - remote: proc-receive> option new-oid <COMMIT-B> - remote: # post-receive hook - remote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main - remote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/bar - remote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/baz - remote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2 - remote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/foo - remote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic - To <URL/of/upstream.git> - <OID-A>..<OID-B> <COMMIT-B> -> main - * [new branch] HEAD -> bar - * [new branch] HEAD -> baz - * [new reference] HEAD -> refs/for/next/topic2 - * [new branch] HEAD -> foo - <OID-A>..<OID-B> HEAD -> refs/for/main/topic - ! [remote rejected] HEAD -> refs/for/next/topic1 (fail to call Web API) - ! [remote rejected] HEAD -> refs/for/next/topic3 (proc-receive failed to report status) + >out-$test_count 2>&1 && + make_user_friendly_and_stable_output <out-$test_count >actual && + format_and_save_expect <<-EOF && + > remote: # pre-receive hook Z + > remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main Z + > remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/bar Z + > remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/baz Z + > remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2 Z + > remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic1 Z + > remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/foo Z + > remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic Z + > remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic3 Z + > remote: # proc-receive hook Z + > remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2 Z + > remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic1 Z + > remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic Z + > remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic3 Z + > remote: proc-receive> ok refs/for/next/topic2 Z + > remote: proc-receive> ng refs/for/next/topic1 fail to call Web API Z + > remote: proc-receive> ok refs/for/main/topic Z + > remote: proc-receive> option refname refs/for/main/topic Z + > remote: proc-receive> option old-oid <COMMIT-A> Z + > remote: proc-receive> option new-oid <COMMIT-B> Z + > remote: # post-receive hook Z + > remote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main Z + > remote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/bar Z + > remote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/baz Z + > remote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2 Z + > remote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/foo Z + > remote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic Z + > To <URL/of/upstream.git> + > <COMMIT-A>..<COMMIT-B> <COMMIT-B> -> main + > * [new branch] HEAD -> bar + > * [new branch] HEAD -> baz + > * [new reference] HEAD -> refs/for/next/topic2 + > * [new branch] HEAD -> foo + > <COMMIT-A>..<COMMIT-B> HEAD -> refs/for/main/topic + > ! [remote rejected] HEAD -> refs/for/next/topic1 (fail to call Web API) + > ! [remote rejected] HEAD -> refs/for/next/topic3 (proc-receive failed to report status) EOF test_cmp expect actual && - git -C "$upstream" show-ref >out && - make_user_friendly_and_stable_output <out >actual && - cat >expect <<-EOF && + + test_cmp_refs -C "$upstream" <<-EOF <COMMIT-A> refs/heads/bar <COMMIT-A> refs/heads/baz <COMMIT-A> refs/heads/foo <COMMIT-B> refs/heads/main EOF - test_cmp expect actual ' # Refs of upstream : main(B) foo(A) bar(A)) baz(A) |