]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5411/test-0050-proc-receive-refs-with-modifiers.sh
test: compare raw output, not mangle tabs and spaces
[thirdparty/git.git] / t / t5411 / test-0050-proc-receive-refs-with-modifiers.sh
index 7214647ada6c5cdff18a10b6d0031c08444e613b..dba544162c509abd6fb282b65360eb26808b8f8f 100644 (file)
@@ -29,25 +29,25 @@ test_expect_success "proc-receive: update branch and new tag ($PROTOCOL)" '
                $B:refs/heads/main \
                v123 >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> <TAG-v123> refs/tags/v123
-       remote: # proc-receive hook
-       remote: proc-receive< <COMMIT-A> <COMMIT-B> refs/heads/main
-       remote: proc-receive< <ZERO-OID> <TAG-v123> refs/tags/v123
-       remote: proc-receive> ok refs/heads/main
-       remote: proc-receive> option refname refs/pull/123/head
-       remote: proc-receive> option old-oid <COMMIT-A>
-       remote: proc-receive> option new-oid <COMMIT-B>
-       remote: proc-receive> ok refs/tags/v123
-       remote: proc-receive> option refname refs/pull/124/head
-       remote: # post-receive hook
-       remote: post-receive< <COMMIT-A> <COMMIT-B> refs/pull/123/head
-       remote: post-receive< <ZERO-OID> <TAG-v123> refs/pull/124/head
-       To <URL/of/upstream.git>
-        <OID-A>..<OID-B> <COMMIT-B> -> refs/pull/123/head
-        * [new reference] v123 -> refs/pull/124/head
+       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> <TAG-v123> refs/tags/v123        Z
+       > remote: # proc-receive hook        Z
+       > remote: proc-receive< <COMMIT-A> <COMMIT-B> refs/heads/main        Z
+       > remote: proc-receive< <ZERO-OID> <TAG-v123> refs/tags/v123        Z
+       > remote: proc-receive> ok refs/heads/main        Z
+       > remote: proc-receive> option refname refs/pull/123/head        Z
+       > remote: proc-receive> option old-oid <COMMIT-A>        Z
+       > remote: proc-receive> option new-oid <COMMIT-B>        Z
+       > remote: proc-receive> ok refs/tags/v123         Z
+       > remote: proc-receive> option refname refs/pull/124/head        Z
+       > remote: # post-receive hook        Z
+       > remote: post-receive< <COMMIT-A> <COMMIT-B> refs/pull/123/head        Z
+       > remote: post-receive< <ZERO-OID> <TAG-v123> refs/pull/124/head        Z
+       To <URL/of/upstream.git>
+       >    <OID-A>..<OID-B>  <COMMIT-B> -> refs/pull/123/head
+       >  * [new reference]   v123 -> refs/pull/124/head
        EOF
        test_cmp expect actual &&
 
@@ -93,32 +93,32 @@ test_expect_success "proc-receive: create/delete branch, and delete tag ($PROTOC
                $A:refs/heads/next \
                :refs/tags/v123 >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
-       cat >expect <<-EOF &&
-       remote: # pre-receive hook
-       remote: pre-receive< <COMMIT-A> <ZERO-OID> refs/heads/main
-       remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/topic
-       remote: pre-receive< <TAG-v123> <ZERO-OID> refs/tags/v123
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
-       remote: # proc-receive hook
-       remote: proc-receive< <COMMIT-A> <ZERO-OID> refs/heads/main
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
-       remote: proc-receive> ok refs/heads/main
-       remote: proc-receive> option refname refs/pull/123/head
-       remote: proc-receive> option old-oid <COMMIT-A>
-       remote: proc-receive> option new-oid <ZERO-OID>
-       remote: proc-receive> ok refs/heads/next
-       remote: proc-receive> option refname refs/pull/124/head
-       remote: proc-receive> option new-oid <COMMIT-A>
-       remote: # post-receive hook
-       remote: post-receive< <COMMIT-A> <ZERO-OID> refs/pull/123/head
-       remote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/topic
-       remote: post-receive< <TAG-v123> <ZERO-OID> refs/tags/v123
-       remote: post-receive< <ZERO-OID> <COMMIT-A> refs/pull/124/head
-       To <URL/of/upstream.git>
-        - [deleted] refs/pull/123/head
-        <OID-A>..<OID-B> <COMMIT-B> -> topic
-        - [deleted] v123
-        * [new reference] <COMMIT-A> -> refs/pull/124/head
+       format_and_save_expect <<-EOF &&
+       > remote: # pre-receive hook        Z
+       > remote: pre-receive< <COMMIT-A> <ZERO-OID> refs/heads/main        Z
+       > remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/topic        Z
+       > remote: pre-receive< <TAG-v123> <ZERO-OID> refs/tags/v123        Z
+       > remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next        Z
+       > remote: # proc-receive hook        Z
+       > remote: proc-receive< <COMMIT-A> <ZERO-OID> refs/heads/main        Z
+       > remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/heads/next        Z
+       > remote: proc-receive> ok refs/heads/main        Z
+       > remote: proc-receive> option refname refs/pull/123/head        Z
+       > remote: proc-receive> option old-oid <COMMIT-A>        Z
+       > remote: proc-receive> option new-oid <ZERO-OID>        Z
+       > remote: proc-receive> ok refs/heads/next        Z
+       > remote: proc-receive> option refname refs/pull/124/head        Z
+       > remote: proc-receive> option new-oid <COMMIT-A>        Z
+       > remote: # post-receive hook        Z
+       > remote: post-receive< <COMMIT-A> <ZERO-OID> refs/pull/123/head        Z
+       > remote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/topic        Z
+       > remote: post-receive< <TAG-v123> <ZERO-OID> refs/tags/v123        Z
+       > remote: post-receive< <ZERO-OID> <COMMIT-A> refs/pull/124/head        Z
+       To <URL/of/upstream.git>
+       >  - [deleted]         refs/pull/123/head
+       >    <OID-A>..<OID-B>  <COMMIT-B> -> topic
+       >  - [deleted]         v123
+       >  * [new reference]   <COMMIT-A> -> refs/pull/124/head
        EOF
        test_cmp expect actual &&