{"thread":{"id":"32400","subject":"[PATCH] t4014: fix arguments to grep","startedAt":"2012-12-19T03:20:55Z","lastAt":"2012-12-19T03:20:55Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"205172","messageId":"7vpq26d8x4.fsf@alter.siamese.dyndns.org","threadId":"32400","inReplyTo":null,"subject":"[PATCH] t4014: fix arguments to grep","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-12-19T03:20:55Z","receivedAt":"2012-12-19T03:20:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"These \"expect-failure\" tests were not looking for the right string\nin the patch file.  For example:\n\n\tgrep \"^ *\"S. E. Cipient\" <scipient@example.com>\\$\" patch5\n\nwas looking for \"^ *S.\" in three files:\n\n    \"E.\"\n    \"Cipient <scipient@example.com>$\"\n    patch5\n\nWith some implementations of grep, the lack of file \"E.\" was\nreported as an error, leading to the expected failure of the test.\nWith other implementations of grep, the pattern \"^ *S.\" matched what\nwas in patch5, without missing files diagnosed as an error, which\nlead to these tests to unexpectedly pass.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t4014-format-patch.sh | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh\nindex 16a4ca1..90fd598 100755\n--- a/t/t4014-format-patch.sh\n+++ b/t/t4014-format-patch.sh\n@@ -155,7 +155,7 @@ test_expect_failure 'additional command line cc (rfc822)' '\n \tgit config --replace-all format.headers \"Cc: R E Cipient <rcipient@example.com>\" &&\n \tgit format-patch --cc=\"S. E. Cipient <scipient@example.com>\" --stdout master..side | sed -e \"/^\\$/q\" >patch5 &&\n \tgrep \"^Cc: R E Cipient <rcipient@example.com>,\\$\" patch5 &&\n-\tgrep \"^ *\"S. E. Cipient\" <scipient@example.com>\\$\" patch5\n+\tgrep \"^ *\\\"S. E. Cipient\\\" <scipient@example.com>\\$\" patch5\n '\n \n test_expect_success 'command line headers' '\n@@ -183,7 +183,7 @@ test_expect_success 'command line To: header (ascii)' '\n test_expect_failure 'command line To: header (rfc822)' '\n \n \tgit format-patch --to=\"R. E. Cipient <rcipient@example.com>\" --stdout master..side | sed -e \"/^\\$/q\" >patch8 &&\n-\tgrep \"^To: \"R. E. Cipient\" <rcipient@example.com>\\$\" patch8\n+\tgrep \"^To: \\\"R. E. Cipient\\\" <rcipient@example.com>\\$\" patch8\n '\n \n test_expect_failure 'command line To: header (rfc2047)' '\n@@ -203,7 +203,7 @@ test_expect_failure 'configuration To: header (rfc822)' '\n \n \tgit config format.to \"R. E. Cipient <rcipient@example.com>\" &&\n \tgit format-patch --stdout master..side | sed -e \"/^\\$/q\" >patch9 &&\n-\tgrep \"^To: \"R. E. Cipient\" <rcipient@example.com>\\$\" patch9\n+\tgrep \"^To: \\\"R. E. Cipient\\\" <rcipient@example.com>\\$\" patch9\n '\n \n test_expect_failure 'configuration To: header (rfc2047)' '\n-- \n1.8.1.rc2.196.g90926c8\n"}]}