{"thread":{"id":"40893","subject":"[PATCH] test_must_fail: compare exit_code using integer -eq operator","startedAt":"2015-11-25T22:05:24Z","lastAt":"2015-11-28T16:58:07Z","messageCount":2,"participants":["Ramsay Jones","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"273770","messageId":"565630A4.7070205@ramsayjones.plus.com","threadId":"40893","inReplyTo":null,"subject":"[PATCH] test_must_fail: compare exit_code using integer -eq operator","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2015-11-25T22:05:24Z","receivedAt":"2015-11-25T22:05:24Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nSigned-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n---\n\nHi Jeff,\n\nCan we squash this into your fixup?\n\nATB,\nRamsay Jones\n\n t/test-lib-functions.sh | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh\nindex 85aeaf9..2bb639e 100644\n--- a/t/test-lib-functions.sh\n+++ b/t/test-lib-functions.sh\n@@ -605,22 +605,22 @@ test_must_fail () {\n \tesac\n \t\"$@\"\n \texit_code=$?\n-\tif test $exit_code = 0 && ! test_list_contains \"$_test_ok\" success\n+\tif test $exit_code -eq 0 && ! test_list_contains \"$_test_ok\" success\n \tthen\n \t\techo >&2 \"test_must_fail: command succeeded: $*\"\n \t\treturn 1\n-\telif test $exit_code = 141 && test_list_contains \"$_test_ok\" sigpipe\n+\telif test $exit_code -eq 141 && test_list_contains \"$_test_ok\" sigpipe\n \tthen\n \t\treturn 0\n \telif test $exit_code -gt 129 && test $exit_code -le 192\n \tthen\n \t\techo >&2 \"test_must_fail: died by signal: $*\"\n \t\treturn 1\n-\telif test $exit_code = 127\n+\telif test $exit_code -eq 127\n \tthen\n \t\techo >&2 \"test_must_fail: command not found: $*\"\n \t\treturn 1\n-\telif test $exit_code = 126\n+\telif test $exit_code -eq 126\n \tthen\n \t\techo >&2 \"test_must_fail: valgrind error: $*\"\n \t\treturn 1\n-- \n2.6.0\n"},{"id":"273810","messageId":"20151128165806.GA27264@sigill.intra.peff.net","threadId":"40893","inReplyTo":"565630A4.7070205@ramsayjones.plus.com","subject":"Re: [PATCH] test_must_fail: compare exit_code using integer -eq operator","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-11-28T16:58:07Z","receivedAt":"2015-11-28T16:58:07Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Nov 25, 2015 at 10:05:24PM +0000, Ramsay Jones wrote:\n\n> Hi Jeff,\n> \n> Can we squash this into your fixup?\n\nI think it's a good thing to do, but I had figured it could be a\nseparate patch (especially since it is touching lines that are otherwise\nunchanged by the patch). Looks like Lars folded it into his patch,\nthough, and I am OK with that, too.\n\n-Peff\n"}]}