Skip to content

Commit

Permalink
Make t8001-annotate and t8002-blame more portable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dennis Stosberg authored and Junio C Hamano committed Jun 18, 2006
1 parent 3e4339e commit 476a4df
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions t/annotate-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 476a4df

Please sign in to comment.