From d8b69ecb4c467c044c08e0435bb22ade16ea580f Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Wed, 6 May 2009 13:29:16 -0500 Subject: t/annotate-tests.sh: avoid passing a non-newline terminated file to sed Some versions of sed exit non-zero if the file they are supplied is not newline terminated. Solaris's /usr/xpg4/bin/sed is one such sed. So rework this test to avoid doing so. This affects tests t8001-annotate.sh and t8002-blame.sh. Signed-off-by: Junio C Hamano --- t/annotate-tests.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 't/annotate-tests.sh') diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh index cacb273aff..396b9653a3 100644 --- a/t/annotate-tests.sh +++ b/t/annotate-tests.sh @@ -114,7 +114,10 @@ test_expect_success \ test_expect_success \ 'some edit' \ 'mv file file.orig && - sed -e "s/^3A/99/" -e "/^1A/d" -e "/^incomplete/d" < file.orig > file && + { + cat file.orig && + echo + } | sed -e "s/^3A/99/" -e "/^1A/d" -e "/^incomplete/d" > file && echo "incomplete" | tr -d "\\012" >>file && GIT_AUTHOR_NAME="D" git commit -a -m "edit"' -- cgit v1.2.3