@matheusbsbs / matheus-bagliano / commits / c01bd5a29f
Fork 0

t/annotate-tests: Use echo & cat instead of sed

The use of the sed command "1i No robots allowed" caused the version of sed in OS X to die with sed: 1: "1i "No robots allowed"\n": command i expects \ followed by text Since this command was just trying to add a single line to the beginning of the file, do the same with "echo" followed by "cat". Unbreaks t8001 and t8002 on OS X 10.6.7 Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Brian Gernhardt committed May 5, 2011 at 00:43 UTC c01bd5a29f38e4e9fd5c03f3e1e84b88c392dd6f
1 file changed +2 -1
t/annotate-tests.sh
+2 -1
@@ -127,7 +127,8 @@ test_expect_success \
127
128 test_expect_success \
129 'an obfuscated email added' \
130 - 'sed -e "1i No robots allowed" < file > file.new &&
130 + 'echo "No robots allowed" > file.new &&
131 + cat file >> file.new &&
132 mv file.new file &&
133 GIT_AUTHOR_NAME="E" GIT_AUTHOR_EMAIL="E at test dot git" git commit -a -m "norobots"'
134