]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5411/test-0022-report-unexpect-ref.sh
test: compare raw output, not mangle tabs and spaces
[thirdparty/git.git] / t / t5411 / test-0022-report-unexpect-ref.sh
index dbed467186a6cf8fae9b9dc66fe227cd25ff10a9..a2ce7ebdf633cf22379a02e82b1d8e32ab1cdca6 100644 (file)
@@ -15,19 +15,19 @@ test_expect_success "proc-receive: report unexpected ref ($PROTOCOL)" '
                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
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
-       remote: # proc-receive hook
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
-       remote: proc-receive> ok refs/heads/main
-       remote: error: proc-receive reported status on unexpected ref: refs/heads/main
-       remote: # post-receive hook
-       remote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main
-       To <URL/of/upstream.git>
-        <OID-A>..<OID-B> <COMMIT-B> -> main
-        ! [remote rejected] HEAD -> refs/for/main/topic (proc-receive failed to report status)
+       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/for/main/topic        Z
+       > remote: # proc-receive hook        Z
+       > remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic        Z
+       > remote: proc-receive> ok refs/heads/main        Z
+       > remote: error: proc-receive reported status on unexpected ref: refs/heads/main        Z
+       > remote: # post-receive hook        Z
+       > remote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main        Z
+       To <URL/of/upstream.git>
+       >    <OID-A>..<OID-B>  <COMMIT-B> -> main
+        ! [remote rejected] HEAD -> refs/for/main/topic (proc-receive failed to report status)
        EOF
        test_cmp expect actual &&