From: Dennis Stosberg Date: Sun, 18 Jun 2006 20:33:21 +0000 (+0200) Subject: Make t8001-annotate and t8002-blame more portable X-Git-Tag: v1.4.1-rc1~13^2~9 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/476a4dfc05f8d67406af277a00f7079b5d6d51e1 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 Signed-off-by: Junio C Hamano --- diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh index 114938c3ff..c04f0e1540 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 \