Print a message when all went well

This commit is contained in:
Sven van Heugten 2026-03-06 17:44:30 +01:00
parent d90e2eebc3
commit fea90637e3
No known key found for this signature in database
GPG key ID: D612F88666F4F660
2 changed files with 8 additions and 0 deletions

View file

@ -111,5 +111,6 @@ for commit_hash in "${commits[@]}"; do
done done
echo echo
echo "Success!"
echo "Returning to $orig_ref" echo "Returning to $orig_ref"
git checkout -q "$orig_ref" git checkout -q "$orig_ref"

View file

@ -46,6 +46,13 @@ commit_with_assertion() {
assert_file_not_exists ../test assert_file_not_exists ../test
} }
@test "should print success after completing" {
run git-check-assertions
assert_success
assert_output --partial "Success!"
}
@test "should refuse to run when the index has changes" { @test "should refuse to run when the index has changes" {
echo "staged" >>readme echo "staged" >>readme
git add readme git add readme