{"thread":{"id":"46074","subject":"[PATCH] [BUG] test_expect_failure mailinfo -b fatals","startedAt":"2017-05-31T10:26:30Z","lastAt":"2017-05-31T10:26:30Z","messageCount":1,"participants":["Kyle J. McKay"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"321121","messageId":"5139b7b6aa7735aefca283afef967d7@50ef27579de002095d3bc9134128513","threadId":"46074","inReplyTo":null,"subject":"[PATCH] [BUG] test_expect_failure mailinfo -b fatals","fromName":"Kyle J. McKay","fromEmail":"mackyle@gmail.com","sentAt":"2017-05-31T10:26:10Z","receivedAt":"2017-05-31T10:26:30Z","isPatch":true,"sender":{"key":"mackyle@gmail.com","avatar":"https://avatars.githubusercontent.com/u/813346?v=4"},"body":"This subject line:\n\n> Subject: [other] [PATCH] message\n\ndoes not get along with the git mailinfo \"-b\" option.  In fact,\nit triggers a fatal bug:\n\n> fatal: `pos + len' is too far after the end of the buffer\n\nWhile I did not do any exhaustive checking, I do happen to have\na few builds of various versions of Git lying around and it\nfails at least as far back as v1.7.6.  (The -b option was\nintroduced in v1.6.6 I believe.)\n\nAt the very least this is now a \"known breakage\", so might\nas well have the tests for it.\n\nIf someone comes along and fixes it it's a simple matter\nto flip them to test_expect_success instead.\n\n--Kyle\n\nP.S. Oh yes, the real patch subject is below (love those >8).\n\n-- 8< --\nSubject: [PATCH] t5100: add some more mailinfo tests\n\nAdd some more simple mailinfo tests including a few that\nproduce:\n\n  fatal: `pos + len' is too far after the end of the buffer\n\nMark those as 'test_expect_failure'.\n\nSigned-off-by: Kyle J. McKay <mackyle@gmail.com>\n---\n\nNotes:\n    checking known breakage:\n    \tsubj=\"$(echo \"Subject: [other] [PATCH] message\" |\n    \t\tgit mailinfo -b /dev/null /dev/null)\" &&\n    \ttest z\"$subj\" = z\"Subject: [other] message\"\n    \n    fatal: `pos + len' is too far after the end of the buffer\n    not ok 46 - mailinfo -b trailing [PATCH] # TODO known breakage\n    \n    checking known breakage:\n    \tsubj=\"$(echo \"Subject: [PATCH] [other] [PATCH] message\" |\n    \t\tgit mailinfo -b /dev/null /dev/null)\" &&\n    \ttest z\"$subj\" = z\"Subject: [other] message\"\n    \n    fatal: `pos + len' is too far after the end of the buffer\n    not ok 47 - mailinfo -b separated double [PATCH] # TODO known breakage\n\n t/t5100-mailinfo.sh | 41 +++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 41 insertions(+)\n\ndiff --git a/t/t5100-mailinfo.sh b/t/t5100-mailinfo.sh\nindex 7171f675..333395c8 100755\n--- a/t/t5100-mailinfo.sh\n+++ b/t/t5100-mailinfo.sh\n@@ -170,5 +170,46 @@ test_expect_success 'mailinfo with mailinfo.scissors config' '\n \ttest_cmp \"$DATA/info0014--scissors\" info0014.sc\n '\n \n+test_expect_success 'mailinfo no options' '\n+\tsubj=\"$(echo \"Subject: [PATCH] [other] [PATCH] message\" |\n+\t\tgit mailinfo /dev/null /dev/null)\" &&\n+\ttest z\"$subj\" = z\"Subject: message\"\n+'\n+\n+test_expect_success 'mailinfo -k' '\n+\tsubj=\"$(echo \"Subject: [PATCH] [other] [PATCH] message\" |\n+\t\tgit mailinfo -k /dev/null /dev/null)\" &&\n+\ttest z\"$subj\" = z\"Subject: [PATCH] [other] [PATCH] message\"\n+'\n+\n+test_expect_success 'mailinfo -b no [PATCH]' '\n+\tsubj=\"$(echo \"Subject: [other] message\" |\n+\t\tgit mailinfo -b /dev/null /dev/null)\" &&\n+\ttest z\"$subj\" = z\"Subject: [other] message\"\n+'\n+\n+test_expect_success 'mailinfo -b leading [PATCH]' '\n+\tsubj=\"$(echo \"Subject: [PATCH] [other] message\" |\n+\t\tgit mailinfo -b /dev/null /dev/null)\" &&\n+\ttest z\"$subj\" = z\"Subject: [other] message\"\n+'\n+\n+test_expect_success 'mailinfo -b double [PATCH]' '\n+\tsubj=\"$(echo \"Subject: [PATCH] [PATCH] message\" |\n+\t\tgit mailinfo -b /dev/null /dev/null)\" &&\n+\ttest z\"$subj\" = z\"Subject: message\"\n+'\n+\n+test_expect_failure 'mailinfo -b trailing [PATCH]' '\n+\tsubj=\"$(echo \"Subject: [other] [PATCH] message\" |\n+\t\tgit mailinfo -b /dev/null /dev/null)\" &&\n+\ttest z\"$subj\" = z\"Subject: [other] message\"\n+'\n+\n+test_expect_failure 'mailinfo -b separated double [PATCH]' '\n+\tsubj=\"$(echo \"Subject: [PATCH] [other] [PATCH] message\" |\n+\t\tgit mailinfo -b /dev/null /dev/null)\" &&\n+\ttest z\"$subj\" = z\"Subject: [other] message\"\n+'\n \n test_done\n---\n"}]}