From fea90637e3ceb546c4db1314f7291bdeb8889853 Mon Sep 17 00:00:00 2001 From: Sven van Heugten Date: Fri, 6 Mar 2026 17:44:30 +0100 Subject: [PATCH] Print a message when all went well --- bin/git-check-assertions | 1 + test/git-check-assertions.bats | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/bin/git-check-assertions b/bin/git-check-assertions index a30b992..e111637 100755 --- a/bin/git-check-assertions +++ b/bin/git-check-assertions @@ -111,5 +111,6 @@ for commit_hash in "${commits[@]}"; do done echo +echo "Success!" echo "Returning to $orig_ref" git checkout -q "$orig_ref" diff --git a/test/git-check-assertions.bats b/test/git-check-assertions.bats index 7d13337..1550ae5 100755 --- a/test/git-check-assertions.bats +++ b/test/git-check-assertions.bats @@ -46,6 +46,13 @@ commit_with_assertion() { 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" { echo "staged" >>readme git add readme