App-GitHooks-Plugin-RequireCommitMessage
view release on metacpan or search on metacpan
};
my $tests =
[
{
name => 'Completely empty commit message.',
files => $files,
commit_message => '',
# This test should show "Aborting commit due to empty commit message" but
# not a line starting with "x " which would indicate that the git hook is
# still active. Because this git message is language-dependent based on the
# locale of the user, we can only test the negative lookahead of the latter.
expected => qr/^(?!x )/,
exit_status => 1,
},
{
name => 'Non-empty commit message without ticket ID.',
files => $files,
commit_message => 'Test commit message.',
expected => qr/^$/,
exit_status => 0,
},
( run in 0.581 second using v1.01-cache-2.11-cpan-ceb78f64989 )