t7503: verify proper hook execution
authorJosh Steadmon <steadmon@google.com>
Wed, 7 Aug 2019 18:57:05 +0000 (11:57 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 7 Aug 2019 19:37:33 +0000 (12:37 -0700)
commitf78f6c7e0ca91a48a4b519cc2cf1197d16810f7a
tree36745c27a6cb3f7b3b4b052ab40d8dbd386ed0d7
parent7c20df84bd21ec0215358381844274fa10515017
t7503: verify proper hook execution

t7503 did not verify that the expected hooks actually ran during
testing. Fix that by making the hook scripts write their $0 into a file
so that we can compare actual execution vs. expected execution.

While we're at it, do some test style cleanups, such as using
write_script() and doing setup inside a test_expect_success block.

Improved-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7503-pre-commit-hook.sh