aboutsummaryrefslogtreecommitdiff
path: root/t/t9010-svn-fe.sh
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2011-03-28 22:08:20 -0500
committerJonathan Nieder <jrnieder@gmail.com>2011-03-29 02:14:23 -0500
commit4c502d68666acba7a83379c7abd971aafee91cf8 (patch)
tree690496e845a5fc08260bf641e0226e88208655c3 /t/t9010-svn-fe.sh
parent41e6b91f01bc9bb7e1679542a8cce9bd4252fd2e (diff)
downloadgit-4c502d68666acba7a83379c7abd971aafee91cf8.tar.gz
git-4c502d68666acba7a83379c7abd971aafee91cf8.tar.xz
tests: make sure input to sed is newline terminated
POSIX only requires sed to work on text files and because it does not end with a newline, this commit's content is not a text file. Add a newline to fix it. Without this change, OS X sed helpfully adds a newline to actual.message, causing t9010.13 to fail. Reported-by: Torsten Bögershausen <tboegi@web.de> Tested-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Diffstat (limited to 't/t9010-svn-fe.sh')
-rwxr-xr-xt/t9010-svn-fe.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/t/t9010-svn-fe.sh b/t/t9010-svn-fe.sh
index 478c86064..6f6175a8f 100755
--- a/t/t9010-svn-fe.sh
+++ b/t/t9010-svn-fe.sh
@@ -407,7 +407,7 @@ test_expect_success 'NUL in log message, file content, and property name' '
OBJID
:000000 100644 OBJID OBJID A greeting
EOF
- printf "\n%s" "something with an ASCII NUL (Q)" >expect.message &&
+ printf "\n%s\n" "something with an ASCII NUL (Q)" >expect.message &&
printf "%s\n" "helQo" >expect.hello1 &&
printf "%s\n" "link hello" >expect.hello2 &&
{
@@ -465,7 +465,11 @@ test_expect_success 'NUL in log message, file content, and property name' '
git diff-tree --root --stdin |
sed "s/$_x40/OBJID/g"
} >actual &&
- git cat-file commit HEAD | nul_to_q | sed -ne "/^\$/,\$ p" >actual.message &&
+ {
+ git cat-file commit HEAD | nul_to_q &&
+ echo
+ } |
+ sed -ne "/^\$/,\$ p" >actual.message &&
git cat-file blob HEAD^:greeting | nul_to_q >actual.hello1 &&
git cat-file blob HEAD:greeting | nul_to_q >actual.hello2 &&
test_cmp expect actual &&