From: Wincent Colaiuta <win@wincent.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, Wincent Colaiuta <win@wincent.com>
Subject: [PATCH] Fix test failure due to broken sed on Leopard
Date: Tue, 18 Dec 2007 16:11:15 +0100 [thread overview]
Message-ID: <1197990675-41698-1-git-send-email-win@wincent.com> (raw)
The newly-added common-tail-optimization test fails on Leopard because
the broken sed implementation bails with a spurious "unterminated
substitute pattern" error because of the length of one of the
arguments.
So halve the size of the argument (to 1024 - 1, down from the previous
2048 - 1) to get the test passing again.
Signed-off-by: Wincent Colaiuta <win@wincent.com>
---
t/t4024-diff-optimize-common.sh | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/t/t4024-diff-optimize-common.sh b/t/t4024-diff-optimize-common.sh
index 20fe87b..bbda816 100755
--- a/t/t4024-diff-optimize-common.sh
+++ b/t/t4024-diff-optimize-common.sh
@@ -7,26 +7,26 @@ test_description='common tail optimization'
z=zzzzzzzz ;# 8
z="$z$z$z$z$z$z$z$z" ;# 64
z="$z$z$z$z$z$z$z$z" ;# 512
-z="$z$z$z$z" ;# 2048
-z2047=$(expr "$z" : '.\(.*\)') ; #2047
+z="$z$z" ;# 1024
+z1023=$(expr "$z" : '.\(.*\)') ; #1023
test_expect_success setup '
- echo "a$z2047" >file-a &&
+ echo "a$z1023" >file-a &&
echo "b" >file-b &&
- echo "$z2047" >>file-b &&
- echo "c$z2047" | tr -d "\012" >file-c &&
+ echo "$z1023" >>file-b &&
+ echo "c$z1023" | tr -d "\012" >file-c &&
echo "d" >file-d &&
- echo "$z2047" | tr -d "\012" >>file-d &&
+ echo "$z1023" | tr -d "\012" >>file-d &&
git add file-a file-b file-c file-d &&
- echo "A$z2047" >file-a &&
+ echo "A$z1023" >file-a &&
echo "B" >file-b &&
- echo "$z2047" >>file-b &&
- echo "C$z2047" | tr -d "\012" >file-c &&
+ echo "$z1023" >>file-b &&
+ echo "C$z1023" | tr -d "\012" >file-c &&
echo "D" >file-d &&
- echo "$z2047" | tr -d "\012" >>file-d
+ echo "$z1023" | tr -d "\012" >>file-d
'
@@ -61,7 +61,7 @@ EOF
test_expect_success 'diff -U0' '
- git diff -U0 | sed -e "/^index/d" -e "s/$z2047/Z/g" >actual &&
+ git diff -U0 | sed -e "/^index/d" -e "s/$z1023/Z/g" >actual &&
diff -u expect actual
'
--
1.5.4.rc0.1099.g76fa0-dirty
reply other threads:[~2007-12-18 15:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1197990675-41698-1-git-send-email-win@wincent.com \
--to=win@wincent.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).