From c39176b1601a2005222c797912281a5a2dad8dcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Thu, 17 Mar 2022 11:13:17 +0100 Subject: proc-receive hook tests: use "test_hook" instead of "write_script" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change the t5411/*.sh tests to use the test_hook helper instead of "write_script". Unfortunately these tests do the setup and test across different test_expect_success blocks, so we have to use --clobber (implying --setup) for these. Let's change those that can use a quoted here-doc to do so while we're at it. Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- t/t5411/test-0040-process-all-refs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/t5411/test-0040-process-all-refs.sh') diff --git a/t/t5411/test-0040-process-all-refs.sh b/t/t5411/test-0040-process-all-refs.sh index 2f405adefa..7ae3851efb 100644 --- a/t/t5411/test-0040-process-all-refs.sh +++ b/t/t5411/test-0040-process-all-refs.sh @@ -17,7 +17,7 @@ test_expect_success "setup upstream branches ($PROTOCOL)" ' ' test_expect_success "setup proc-receive hook ($PROTOCOL)" ' - write_script "$upstream/hooks/proc-receive" <<-EOF + test_hook -C "$upstream" --clobber proc-receive <<-EOF printf >&2 "# proc-receive hook\n" test-tool proc-receive -v \ -r "ok refs/heads/main" \ -- cgit v1.2.3