t7510: exit for loop with test result
[gitweb.git] / t / t7510-signed-commit.sh
index 5ddac1a9f740c03f1d94f75db2c6e54dd3391eda..96cfddf80fa0e01a7c3d184fa8ecf26842a41d44 100755 (executable)
@@ -50,7 +50,7 @@ test_expect_success GPG 'show signatures' '
                for commit in initial second merge fourth-signed fifth-signed sixth-signed master
                do
                        git show --pretty=short --show-signature $commit >actual &&
-                       grep "Good signature from" actual || exit 1
+                       grep "Good signature from" actual &&
                        ! grep "BAD signature from" actual || exit 1
                        echo $commit OK
                done
@@ -59,7 +59,7 @@ test_expect_success GPG 'show signatures' '
                for commit in merge^2 fourth-unsigned sixth-unsigned seventh-unsigned
                do
                        git show --pretty=short --show-signature $commit >actual &&
-                       grep "Good signature from" actual && exit 1
+                       ! grep "Good signature from" actual &&
                        ! grep "BAD signature from" actual || exit 1
                        echo $commit OK
                done