git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Make t8001-annotate and t8002-blame more portable
@ 2006-06-18 20:33 Dennis Stosberg
  2006-06-18 20:58 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Dennis Stosberg @ 2006-06-18 20:33 UTC (permalink / raw)
  To: git

These two tests assume that "sed" will not modify the final line of a
stream if it does not end with a newline character.  The assumption is
not true at least for FreeBSD and Solaris 9.  FreeBSD's "sed" appends
a newline character; "sed" in Solaris 9 even removes the incomplete
final line.  This patch makes the test use perl instead.

Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
---
 t/annotate-tests.sh |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh
index 114938c..71d0f30 100644
--- a/t/annotate-tests.sh
+++ b/t/annotate-tests.sh
@@ -111,9 +111,7 @@ test_expect_success \
 
 test_expect_success \
     'some edit' \
-    'mv file file1 &&
-     sed -e 1d -e "5s/3A/99/" file1 >file &&
-     rm -f file1 &&
+    'perl -pi -e "s/^1A.*\n$//; s/^3A/99/" file &&
     GIT_AUTHOR_NAME="D" git commit -a -m "edit"'
 
 test_expect_success \
-- 
1.4.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-06-19 19:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-18 20:33 [PATCH] Make t8001-annotate and t8002-blame more portable Dennis Stosberg
2006-06-18 20:58 ` Junio C Hamano
2006-06-18 22:06   ` Dennis Stosberg
2006-06-18 22:21     ` Junio C Hamano
2006-06-19 16:35   ` Alex Riesen
2006-06-19 19:40     ` [PATCH] Fix t8001-annotate and t8002-blame for ActiveState Perl Dennis Stosberg

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