]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t9001-send-email.sh
Merge branch 'ab/send-email-inline-hooks-path'
[thirdparty/git.git] / t / t9001-send-email.sh
index aa603cf4d07de45f16796bf3a487b27a1ec73cb2..3b7540050ca8d630086d58f8b85d08d209684194 100755 (executable)
@@ -539,14 +539,15 @@ test_expect_success $PREREQ "--validate respects relative core.hooksPath path" '
        test_path_is_file my-hooks.ran &&
        cat >expect <<-EOF &&
        fatal: longline.patch: rejected by sendemail-validate hook
-       fatal: command '"'"'$PWD/my-hooks/sendemail-validate'"'"' died with exit code 1
+       fatal: command '"'"'my-hooks/sendemail-validate'"'"' died with exit code 1
        warning: no patches were sent
        EOF
        test_cmp expect actual
 '
 
 test_expect_success $PREREQ "--validate respects absolute core.hooksPath path" '
-       test_config core.hooksPath "$(pwd)/my-hooks" &&
+       hooks_path="$(pwd)/my-hooks" &&
+       test_config core.hooksPath "$hooks_path" &&
        test_when_finished "rm my-hooks.ran" &&
        test_must_fail git send-email \
                --from="Example <nobody@example.com>" \
@@ -557,7 +558,7 @@ test_expect_success $PREREQ "--validate respects absolute core.hooksPath path" '
        test_path_is_file my-hooks.ran &&
        cat >expect <<-EOF &&
        fatal: longline.patch: rejected by sendemail-validate hook
-       fatal: command '"'"'$PWD/my-hooks/sendemail-validate'"'"' died with exit code 1
+       fatal: command '"'"'$hooks_path/sendemail-validate'"'"' died with exit code 1
        warning: no patches were sent
        EOF
        test_cmp expect actual