summaryrefslogtreecommitdiff
path: root/t/t5411/test-0012-no-hook-error--porcelain.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t5411/test-0012-no-hook-error--porcelain.sh')
-rw-r--r--t/t5411/test-0012-no-hook-error--porcelain.sh20
1 files changed, 8 insertions, 12 deletions
diff --git a/t/t5411/test-0012-no-hook-error--porcelain.sh b/t/t5411/test-0012-no-hook-error--porcelain.sh
index 14ea433481..19f66fbd7d 100644
--- a/t/t5411/test-0012-no-hook-error--porcelain.sh
+++ b/t/t5411/test-0012-no-hook-error--porcelain.sh
@@ -5,8 +5,8 @@ test_expect_success "proc-receive: no hook, fail to push special ref ($PROTOCOL/
test_must_fail git -C workbench push --porcelain origin \
HEAD:next \
HEAD:refs/for/main/topic \
- >out 2>&1 &&
- make_user_friendly_and_stable_output <out >actual &&
+ >out-$test_count 2>&1 &&
+ make_user_friendly_and_stable_output <out-$test_count >actual &&
cat >expect <<-EOF &&
remote: # pre-receive hook
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
@@ -20,13 +20,11 @@ test_expect_success "proc-receive: no hook, fail to push special ref ($PROTOCOL/
Done
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/main
<COMMIT-A> refs/heads/next
EOF
- test_cmp expect actual
'
# Refs of upstream : main(A) next(A)
@@ -42,8 +40,8 @@ test_expect_success "proc-receive: no hook, all failed for atomic push ($PROTOCO
test_must_fail git -C workbench push --porcelain --atomic origin \
$B:main \
HEAD:next \
- HEAD:refs/for/main/topic >out 2>&1 &&
- make_user_friendly_and_stable_output <out >actual &&
+ HEAD:refs/for/main/topic >out-$test_count 2>&1 &&
+ make_user_friendly_and_stable_output <out-$test_count >actual &&
cat >expect <<-EOF &&
remote: # pre-receive hook
remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main
@@ -57,10 +55,8 @@ test_expect_success "proc-receive: no hook, all failed for atomic push ($PROTOCO
Done
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/main
EOF
- test_cmp expect actual
'