git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix test failure due to broken sed on Leopard
@ 2007-12-18 15:11 Wincent Colaiuta
  0 siblings, 0 replies; only message in thread
From: Wincent Colaiuta @ 2007-12-18 15:11 UTC (permalink / raw)
  To: git; +Cc: gitster, Wincent Colaiuta

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-12-18 15:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-18 15:11 [PATCH] Fix test failure due to broken sed on Leopard Wincent Colaiuta

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).