diff options
author | 2018-11-01 21:58:04 +0100 | |
---|---|---|
committer | 2019-04-09 13:05:55 +0200 | |
commit | 01c76c6978bc0b2a667fd35cae150600ace1ea50 (patch) | |
tree | ade1f9fb04e0e41b0f53f437235383ff31b2b863 /local/tests/update-06-copyright.sh | |
parent | update-06-copyright: Allow for comments in S-o-b (diff) | |
download | githooks-01c76c6978bc0b2a667fd35cae150600ace1ea50.tar.gz githooks-01c76c6978bc0b2a667fd35cae150600ace1ea50.tar.bz2 githooks-01c76c6978bc0b2a667fd35cae150600ace1ea50.zip |
update-06-copyright: Support new/removed branches better
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'local/tests/update-06-copyright.sh')
-rwxr-xr-x | local/tests/update-06-copyright.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/local/tests/update-06-copyright.sh b/local/tests/update-06-copyright.sh index 0e0d3be..0b93044 100755 --- a/local/tests/update-06-copyright.sh +++ b/local/tests/update-06-copyright.sh @@ -343,4 +343,40 @@ test_failure "${FAIL_NO_SIGNOFF}" eoutdent +einfo "Branch addition / removal tests" +eindent + +tbegin "Forked branch with sign-off present" +git checkout -q -b test-branch +git commit --allow-empty -m "Commit with sign-off + +Signed-off-by: ${GIT_COMMITTER_NAME} <${GIT_COMMITTER_EMAIL}>" -q +test_branch_success test-branch + +tbegin "Forked branch with new non-signed commit" +git checkout -q -b test-branch +git commit --allow-empty -m "Commit without sign-off" -q +test_branch_failure test-branch "${FAIL_NO_SIGNOFF}" + +tbegin "Copy of master branch" +git checkout -q -b test-branch +test_branch_success test-branch + +tbegin "New independent branch with sign-off" +git checkout --orphan test-branch -q +git commit --allow-empty -m "Commit with sign-off + +Signed-off-by: ${GIT_COMMITTER_NAME} <${GIT_COMMITTER_EMAIL}>" -q +test_branch_success test-branch + +tbegin "New independent branch without sign-off" +git checkout --orphan test-branch -q +git commit --allow-empty -m "Commit without sign-off" -q +test_branch_failure test-branch "${FAIL_NO_SIGNOFF}" + +tbegin "Branch removal" +test_branch_removal + +eoutdent + exit "${TEST_RET}" |