diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-02-17 17:21:42 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-02-17 17:21:42 -0800 |
commit | fdf3a27ca9f44d0c5597b2d1a018b02f09ba8602 (patch) | |
tree | 70dd59574abf2bc0c9f9cd7f0e37cf25f936324b /t/t5411/test-0026-push-options.sh | |
parent | Merge branch 'js/fsck-name-objects-fix' (diff) | |
parent | t5411: refactor check of refs using test_cmp_refs (diff) | |
download | tgif-fdf3a27ca9f44d0c5597b2d1a018b02f09ba8602.tar.xz |
Merge branch 'jx/t5411-unique-filenames'
Avoid individual tests in t5411 from getting affected by each other
by forcing them to use separate output files during the test.
* jx/t5411-unique-filenames:
t5411: refactor check of refs using test_cmp_refs
t5411: use different out file to prevent overwriting
Diffstat (limited to 't/t5411/test-0026-push-options.sh')
-rw-r--r-- | t/t5411/test-0026-push-options.sh | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/t/t5411/test-0026-push-options.sh b/t/t5411/test-0026-push-options.sh index e88edb16a4..1ec2cb95bc 100644 --- a/t/t5411/test-0026-push-options.sh +++ b/t/t5411/test-0026-push-options.sh @@ -16,16 +16,14 @@ test_expect_success "proc-receive: not support push options ($PROTOCOL)" ' -o reviewer=user1 \ origin \ 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 && test_i18ngrep "fatal: the receiving end does not support push options" \ 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 "enable push options ($PROTOCOL)" ' @@ -69,13 +67,11 @@ test_expect_success "proc-receive: ignore push-options for version 0 ($PROTOCOL) * [new reference] HEAD -> refs/for/main/topic 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 ' test_expect_success "restore proc-receive hook ($PROTOCOL)" ' @@ -123,13 +119,11 @@ test_expect_success "proc-receive: push with options ($PROTOCOL)" ' * [new reference] HEAD -> refs/for/main/topic 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) |