{"thread":{"id":"36837","subject":"[PATCH v2] t9001: avoid not portable '\\n' with sed","startedAt":"2014-06-04T19:42:25Z","lastAt":"2014-06-04T19:42:25Z","messageCount":1,"participants":["Torsten Bögershausen"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"243337","messageId":"538F76A1.4060008@web.de","threadId":"36837","inReplyTo":null,"subject":"[PATCH v2] t9001: avoid not portable '\\n' with sed","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2014-06-04T19:42:25Z","receivedAt":"2014-06-04T19:42:25Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"t9001 used a '\\n' in a sed expression to split one line into two lines.\nSome versions of sed (/usr/bin/sed under Mac OS X)\nsimply ignore the '\\' before the 'n', treating '\\n' as 'n'.\n\nAs the test already requires perl as a prerequisite, use perl instead of sed.\n\nSigned-off-by: Torsten Bögershausen <tboegi@web.de>\n---\n t/t9001-send-email.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 64d9434..19a3ced 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -1342,7 +1342,7 @@ test_cover_addresses () {\n \tgit format-patch --cover-letter -2 -o outdir &&\n \tcover=`echo outdir/0000-*.patch` &&\n \tmv $cover cover-to-edit.patch &&\n-\tsed \"s/^From:/$header: extra@address.com\\nFrom:/\" cover-to-edit.patch >\"$cover\" &&\n+\tperl -pe \"s/^From:/$header: extra\\@address.com\\nFrom:/\" cover-to-edit.patch >\"$cover\" &&\n \tgit send-email \\\n \t  --force \\\n \t  --from=\"Example <nobody@example.com>\" \\\n-- \n2.0.0.553.ged01b91\n"}]}