]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5411/test-0033-report-with-options--porcelain.sh
proc-receive hook tests: use "test_hook" instead of "write_script"
[thirdparty/git.git] / t / t5411 / test-0033-report-with-options--porcelain.sh
index daacb3d69d4af4a18f5516b02f017efbe16f72cf..2e1831b104e8a98ab31f83fc9f9d2e4201d9feaa 100644 (file)
@@ -1,5 +1,5 @@
 test_expect_success "setup proc-receive hook (option without matching ok, $PROTOCOL/porcelain)" '
-       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 "option refname refs/pull/123/head" \
@@ -31,7 +31,7 @@ test_expect_success "proc-receive: report option without matching ok ($PROTOCOL/
 '
 
 test_expect_success "setup proc-receive hook (option refname, $PROTOCOL/porcelain)" '
-       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/for/main/topic" \
@@ -64,7 +64,7 @@ test_expect_success "proc-receive: report option refname ($PROTOCOL/porcelain)"
 '
 
 test_expect_success "setup proc-receive hook (option refname and forced-update, $PROTOCOL/porcelain)" '
-       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/for/main/topic" \
@@ -99,7 +99,7 @@ test_expect_success "proc-receive: report option refname and forced-update ($PRO
 '
 
 test_expect_success "setup proc-receive hook (option refname and old-oid, $PROTOCOL/porcelain)" '
-       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/for/main/topic" \
@@ -134,7 +134,7 @@ test_expect_success "proc-receive: report option refname and old-oid ($PROTOCOL/
 '
 
 test_expect_success "setup proc-receive hook (option old-oid, $PROTOCOL/porcelain)" '
-       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/for/main/topic" \
@@ -167,7 +167,7 @@ test_expect_success "proc-receive: report option old-oid ($PROTOCOL/porcelain)"
 '
 
 test_expect_success "setup proc-receive hook (option old-oid and new-oid, $PROTOCOL/porcelain)" '
-       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/for/main/topic" \
@@ -202,7 +202,7 @@ test_expect_success "proc-receive: report option old-oid and new-oid ($PROTOCOL/
 '
 
 test_expect_success "setup proc-receive hook (report with multiple rewrites, $PROTOCOL/porcelain)" '
-       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/for/a/b/c/topic" \