diff options
Diffstat (limited to 't/t5411/test-0033-report-with-options--porcelain.sh')
-rw-r--r-- | t/t5411/test-0033-report-with-options--porcelain.sh | 200 |
1 files changed, 100 insertions, 100 deletions
diff --git a/t/t5411/test-0033-report-with-options--porcelain.sh b/t/t5411/test-0033-report-with-options--porcelain.sh index 11486720ee..daacb3d69d 100644 --- a/t/t5411/test-0033-report-with-options--porcelain.sh +++ b/t/t5411/test-0033-report-with-options--porcelain.sh @@ -15,17 +15,17 @@ test_expect_success "proc-receive: report option without matching ok ($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< <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> option refname refs/pull/123/head - remote: proc-receive> option old-oid <COMMIT-B> - remote: error: proc-receive reported "option" without a matching "ok/ng" directive - To <URL/of/upstream.git> - ! HEAD:refs/for/main/topic [remote rejected] (proc-receive failed to report status) - Done + format_and_save_expect <<-EOF && + > remote: # pre-receive hook 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> option refname refs/pull/123/head Z + > remote: proc-receive> option old-oid <COMMIT-B> Z + > remote: error: proc-receive reported "option" without a matching "ok/ng" directive Z + > To <URL/of/upstream.git> + > ! HEAD:refs/for/main/topic [remote rejected] (proc-receive failed to report status) + > Done EOF test_cmp expect actual ' @@ -47,18 +47,18 @@ test_expect_success "proc-receive: report option refname ($PROTOCOL/porcelain)" HEAD:refs/for/main/topic \ >out 2>&1 && make_user_friendly_and_stable_output <out >actual && - cat >expect <<-EOF && - remote: # pre-receive hook - 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/for/main/topic - remote: proc-receive> option refname refs/pull/123/head - remote: # post-receive hook - remote: post-receive< <ZERO-OID> <COMMIT-A> refs/pull/123/head - To <URL/of/upstream.git> - * HEAD:refs/pull/123/head [new reference] - Done + format_and_save_expect <<-EOF && + > remote: # pre-receive hook 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/for/main/topic Z + > remote: proc-receive> option refname refs/pull/123/head Z + > remote: # post-receive hook Z + > remote: post-receive< <ZERO-OID> <COMMIT-A> refs/pull/123/head Z + > To <URL/of/upstream.git> + > * HEAD:refs/pull/123/head [new reference] + > Done EOF test_cmp expect actual ' @@ -81,19 +81,19 @@ test_expect_success "proc-receive: report option refname and forced-update ($PRO HEAD:refs/for/main/topic \ >out 2>&1 && make_user_friendly_and_stable_output <out >actual && - cat >expect <<-EOF && - remote: # pre-receive hook - 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/for/main/topic - remote: proc-receive> option refname refs/pull/123/head - remote: proc-receive> option forced-update - remote: # post-receive hook - remote: post-receive< <ZERO-OID> <COMMIT-A> refs/pull/123/head - To <URL/of/upstream.git> - * HEAD:refs/pull/123/head [new reference] - Done + format_and_save_expect <<-EOF && + > remote: # pre-receive hook 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/for/main/topic Z + > remote: proc-receive> option refname refs/pull/123/head Z + > remote: proc-receive> option forced-update Z + > remote: # post-receive hook Z + > remote: post-receive< <ZERO-OID> <COMMIT-A> refs/pull/123/head Z + > To <URL/of/upstream.git> + > * HEAD:refs/pull/123/head [new reference] + > Done EOF test_cmp expect actual ' @@ -116,19 +116,19 @@ test_expect_success "proc-receive: report option refname and old-oid ($PROTOCOL/ HEAD:refs/for/main/topic \ >out 2>&1 && make_user_friendly_and_stable_output <out >actual && - cat >expect <<-EOF && - remote: # pre-receive hook - 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/for/main/topic - remote: proc-receive> option refname refs/pull/123/head - remote: proc-receive> option old-oid <COMMIT-B> - remote: # post-receive hook - remote: post-receive< <COMMIT-B> <COMMIT-A> refs/pull/123/head - To <URL/of/upstream.git> - HEAD:refs/pull/123/head <OID-B>..<OID-A> - Done + format_and_save_expect <<-EOF && + > remote: # pre-receive hook 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/for/main/topic Z + > remote: proc-receive> option refname refs/pull/123/head Z + > remote: proc-receive> option old-oid <COMMIT-B> Z + > remote: # post-receive hook Z + > remote: post-receive< <COMMIT-B> <COMMIT-A> refs/pull/123/head Z + > To <URL/of/upstream.git> + > HEAD:refs/pull/123/head <COMMIT-B>..<COMMIT-A> + > Done EOF test_cmp expect actual ' @@ -150,18 +150,18 @@ test_expect_success "proc-receive: report option old-oid ($PROTOCOL/porcelain)" HEAD:refs/for/main/topic \ >out 2>&1 && make_user_friendly_and_stable_output <out >actual && - cat >expect <<-EOF && - remote: # pre-receive hook - 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/for/main/topic - remote: proc-receive> option old-oid <COMMIT-B> - remote: # post-receive hook - remote: post-receive< <COMMIT-B> <COMMIT-A> refs/for/main/topic - To <URL/of/upstream.git> - HEAD:refs/for/main/topic <OID-B>..<OID-A> - Done + format_and_save_expect <<-EOF && + > remote: # pre-receive hook 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/for/main/topic Z + > remote: proc-receive> option old-oid <COMMIT-B> Z + > remote: # post-receive hook Z + > remote: post-receive< <COMMIT-B> <COMMIT-A> refs/for/main/topic Z + > To <URL/of/upstream.git> + > HEAD:refs/for/main/topic <COMMIT-B>..<COMMIT-A> + > Done EOF test_cmp expect actual ' @@ -184,19 +184,19 @@ test_expect_success "proc-receive: report option old-oid and new-oid ($PROTOCOL/ HEAD:refs/for/main/topic \ >out 2>&1 && make_user_friendly_and_stable_output <out >actual && - cat >expect <<-EOF && - remote: # pre-receive hook - 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/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/for/main/topic - To <URL/of/upstream.git> - HEAD:refs/for/main/topic <OID-A>..<OID-B> - Done + format_and_save_expect <<-EOF && + > remote: # pre-receive hook 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/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/for/main/topic Z + > To <URL/of/upstream.git> + > HEAD:refs/for/main/topic <COMMIT-A>..<COMMIT-B> + > Done EOF test_cmp expect actual ' @@ -227,32 +227,32 @@ test_expect_success "proc-receive: report with multiple rewrites ($PROTOCOL/porc HEAD:refs/for/main/topic \ >out 2>&1 && make_user_friendly_and_stable_output <out >actual && - cat >expect <<-EOF && - remote: # pre-receive hook - remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic - remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/topic - remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic - remote: # proc-receive hook - remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic - remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/topic - remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic - remote: proc-receive> ok refs/for/a/b/c/topic - remote: proc-receive> ok refs/for/next/topic - remote: proc-receive> option refname refs/pull/123/head - remote: proc-receive> ok refs/for/main/topic - remote: proc-receive> option refname refs/pull/124/head - remote: proc-receive> option old-oid <COMMIT-B> - remote: proc-receive> option forced-update - remote: proc-receive> option new-oid <COMMIT-A> - remote: # post-receive hook - remote: post-receive< <ZERO-OID> <COMMIT-A> refs/pull/123/head - remote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/topic - remote: post-receive< <COMMIT-B> <COMMIT-A> refs/pull/124/head - To <URL/of/upstream.git> - * HEAD:refs/pull/123/head [new reference] - * HEAD:refs/for/a/b/c/topic [new reference] - + HEAD:refs/pull/124/head <OID-B>...<OID-A> (forced update) - Done + format_and_save_expect <<-EOF && + > remote: # pre-receive hook Z + > remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic Z + > remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/topic 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/next/topic Z + > remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/topic Z + > remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic Z + > remote: proc-receive> ok refs/for/a/b/c/topic Z + > remote: proc-receive> ok refs/for/next/topic Z + > remote: proc-receive> option refname refs/pull/123/head Z + > remote: proc-receive> ok refs/for/main/topic Z + > remote: proc-receive> option refname refs/pull/124/head Z + > remote: proc-receive> option old-oid <COMMIT-B> Z + > remote: proc-receive> option forced-update Z + > remote: proc-receive> option new-oid <COMMIT-A> Z + > remote: # post-receive hook Z + > remote: post-receive< <ZERO-OID> <COMMIT-A> refs/pull/123/head Z + > remote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/topic Z + > remote: post-receive< <COMMIT-B> <COMMIT-A> refs/pull/124/head Z + > To <URL/of/upstream.git> + > * HEAD:refs/pull/123/head [new reference] + > * HEAD:refs/for/a/b/c/topic [new reference] + > + HEAD:refs/pull/124/head <COMMIT-B>...<COMMIT-A> (forced update) + > Done EOF test_cmp expect actual && |