aboutsummaryrefslogtreecommitdiff
path: root/t/annotate-tests.sh
diff options
context:
space:
mode:
authorDennis Stosberg <dennis@stosberg.net>2006-06-18 22:33:21 +0200
committerJunio C Hamano <junkio@cox.net>2006-06-18 13:58:20 -0700
commit476a4dfc05f8d67406af277a00f7079b5d6d51e1 (patch)
treee6627d6de94deaf4d6c1ce02061aea89886ea035 /t/annotate-tests.sh
parent3e4339e6f96e8c4f38a9c6607b98d3e96a2ed783 (diff)
downloadgit-476a4dfc05f8d67406af277a00f7079b5d6d51e1.tar.gz
git-476a4dfc05f8d67406af277a00f7079b5d6d51e1.tar.xz
Make t8001-annotate and t8002-blame more portable
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> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't/annotate-tests.sh')
-rw-r--r--t/annotate-tests.sh4
1 files changed, 1 insertions, 3 deletions
diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh
index 114938c3f..c04f0e154 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 \