{"thread":{"id":"11342","subject":"[PATCH] Fix test failure due to broken sed on Leopard","startedAt":"2007-12-18T15:11:15Z","lastAt":"2007-12-18T15:11:15Z","messageCount":1,"participants":["Wincent Colaiuta"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"63618","messageId":"1197990675-41698-1-git-send-email-win@wincent.com","threadId":"11342","inReplyTo":null,"subject":"[PATCH] Fix test failure due to broken sed on Leopard","fromName":"Wincent Colaiuta","fromEmail":"win@wincent.com","sentAt":"2007-12-18T15:11:15Z","receivedAt":"2007-12-18T15:11:15Z","isPatch":true,"sender":{"key":"greg@hurrell.net","avatar":"https://avatars.githubusercontent.com/u/7074?v=4"},"body":"The newly-added common-tail-optimization test fails on Leopard because\nthe broken sed implementation bails with a spurious \"unterminated\nsubstitute pattern\" error because of the length of one of the\narguments.\n\nSo halve the size of the argument (to 1024 - 1, down from the previous\n2048 - 1) to get the test passing again.\n\nSigned-off-by: Wincent Colaiuta <win@wincent.com>\n---\n t/t4024-diff-optimize-common.sh |   22 +++++++++++-----------\n 1 files changed, 11 insertions(+), 11 deletions(-)\n\ndiff --git a/t/t4024-diff-optimize-common.sh b/t/t4024-diff-optimize-common.sh\nindex 20fe87b..bbda816 100755\n--- a/t/t4024-diff-optimize-common.sh\n+++ b/t/t4024-diff-optimize-common.sh\n@@ -7,26 +7,26 @@ test_description='common tail optimization'\n z=zzzzzzzz ;# 8\n z=\"$z$z$z$z$z$z$z$z\" ;# 64\n z=\"$z$z$z$z$z$z$z$z\" ;# 512\n-z=\"$z$z$z$z\" ;# 2048\n-z2047=$(expr \"$z\" : '.\\(.*\\)') ; #2047\n+z=\"$z$z\" ;# 1024\n+z1023=$(expr \"$z\" : '.\\(.*\\)') ; #1023\n \n test_expect_success setup '\n \n-\techo \"a$z2047\" >file-a &&\n+\techo \"a$z1023\" >file-a &&\n \techo \"b\" >file-b &&\n-\techo \"$z2047\" >>file-b &&\n-\techo \"c$z2047\" | tr -d \"\\012\" >file-c &&\n+\techo \"$z1023\" >>file-b &&\n+\techo \"c$z1023\" | tr -d \"\\012\" >file-c &&\n \techo \"d\" >file-d &&\n-\techo \"$z2047\" | tr -d \"\\012\" >>file-d &&\n+\techo \"$z1023\" | tr -d \"\\012\" >>file-d &&\n \n \tgit add file-a file-b file-c file-d &&\n \n-\techo \"A$z2047\" >file-a &&\n+\techo \"A$z1023\" >file-a &&\n \techo \"B\" >file-b &&\n-\techo \"$z2047\" >>file-b &&\n-\techo \"C$z2047\" | tr -d \"\\012\" >file-c &&\n+\techo \"$z1023\" >>file-b &&\n+\techo \"C$z1023\" | tr -d \"\\012\" >file-c &&\n \techo \"D\" >file-d &&\n-\techo \"$z2047\" | tr -d \"\\012\" >>file-d\n+\techo \"$z1023\" | tr -d \"\\012\" >>file-d\n \n '\n \n@@ -61,7 +61,7 @@ EOF\n \n test_expect_success 'diff -U0' '\n \n-\tgit diff -U0 | sed -e \"/^index/d\" -e \"s/$z2047/Z/g\" >actual &&\n+\tgit diff -U0 | sed -e \"/^index/d\" -e \"s/$z1023/Z/g\" >actual &&\n \tdiff -u expect actual\n \n '\n-- \n1.5.4.rc0.1099.g76fa0-dirty\n"}]}