1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-28 20:56:09 +02:00

Merge branch 'jt/send-email-validate-errors-fix' into next

Fix a test breakage.

* jt/send-email-validate-errors-fix:
  t9001-send-email.sh: fix expected absolute paths on Windows
This commit is contained in:
Junio C Hamano 2021-05-25 14:56:51 +09:00
commit f7659a41c8

View File

@ -539,15 +539,14 @@ 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 '"'"'$PWD/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" '
hooks_path="$(pwd)/my-hooks" &&
test_config core.hooksPath "$hooks_path" &&
test_config core.hooksPath "$(pwd)/my-hooks" &&
test_when_finished "rm my-hooks.ran" &&
test_must_fail git send-email \
--from="Example <nobody@example.com>" \
@ -558,7 +557,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 '"'"'$hooks_path/sendemail-validate'"'"' died with exit code 1
fatal: command '"'"'$PWD/my-hooks/sendemail-validate'"'"' died with exit code 1
warning: no patches were sent
EOF
test_cmp expect actual