]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5411/test-0037-report-multi-rewrite-for-one-ref--porcelain.sh
t5411: refactor check of refs using test_cmp_refs
[thirdparty/git.git] / t / t5411 / test-0037-report-multi-rewrite-for-one-ref--porcelain.sh
index dc254d57eb0ddbe8aa6e2803bf86c58980600d70..95fb89c031d1625f8a99712d8089c1e8d54c715d 100644 (file)
@@ -51,12 +51,10 @@ test_expect_success "proc-receive: multiple rewrite for one ref, no refname for
        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
 '
 
 test_expect_success "setup proc-receive hook (multiple rewrites for one ref, no refname for the 2nd rewrite, $PROTOCOL/porcelain)" '
@@ -114,12 +112,10 @@ test_expect_success "proc-receive: multiple rewrites for one ref, no refname for
        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
 '
 
 test_expect_success "setup proc-receive hook (multiple rewrites for one ref, $PROTOCOL/porcelain)" '
@@ -163,10 +159,8 @@ test_expect_success "proc-receive: multiple rewrites for one ref ($PROTOCOL/porc
        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
 '