From 475b0c6fa15107d3eb7877130cf5013bdd45290b Mon Sep 17 00:00:00 2001 From: Sven van Heugten Date: Tue, 3 Mar 2026 20:28:17 +0100 Subject: [PATCH] Verify that stderr is taken into account --- test/git-check-assertions.bats | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/git-check-assertions.bats b/test/git-check-assertions.bats index 11f23e7..a6a2bba 100755 --- a/test/git-check-assertions.bats +++ b/test/git-check-assertions.bats @@ -170,3 +170,12 @@ commit_with_assertion() { assert_output --partial "Expected output to equal: goodbye" assert_output --partial "Actual output: hello" } + +@test "assert_output should also check stderr output" { + git checkout -b feature + commit_with_assertion $'run sh -c "echo err 1>&2"\nassert_output err' + + run git-check-assertions + + assert_success +}