roberto.tyley@xxxxxxxxx writes: > +. ./test-lib.sh > + > +assert_blob_equals() { > + echo -n $2 > expected && > + git cat-file -p $1 > actual && Needs proper quoting with dq. > + test_cmp expected actual > +} > + > +test_expect_success setup ' > + cp -R ../t1013/objects .git/ > + git --version > +' > + > +test_expect_success 'read standard-format loose objects' ' > + git cat-file tag 8d4e360d6c70fbd72411991c02a09c442cf7a9fa && > + git cat-file commit 6baee0540ea990d9761a3eb9ab183003a71c3696 && > + git ls-tree 7a37b887a73791d12d26c0d3e39568a8fb0fa6e8 && > + assert_blob_equals "257cc5642cb1a054f08cc83f2d943e56fd3ebe99" "foo\n" Isn't it unportable to expect "\n" to be kept or expanded by "echo"? Will squash the following in (and I have another patch on top to consolidate the definition of $LF in this and other test scripts). Thanks. -- >8 -- Subject: [PATCH] fixup! Tolerate zlib deflation with window Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> --- t/t1013-loose-object-format.sh | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/t/t1013-loose-object-format.sh b/t/t1013-loose-object-format.sh index b5ac46d..36b4027 100755 --- a/t/t1013-loose-object-format.sh +++ b/t/t1013-loose-object-format.sh @@ -26,10 +26,12 @@ standard format, deflated with 4KB window size: Agit/JGit on Android ' . ./test-lib.sh +LF=' +' assert_blob_equals() { - echo -n $2 > expected && - git cat-file -p $1 > actual && + printf "%s" "$2" >expected && + git cat-file -p "$1" >actual && test_cmp expected actual } @@ -42,7 +44,7 @@ test_expect_success 'read standard-format loose objects' ' git cat-file tag 8d4e360d6c70fbd72411991c02a09c442cf7a9fa && git cat-file commit 6baee0540ea990d9761a3eb9ab183003a71c3696 && git ls-tree 7a37b887a73791d12d26c0d3e39568a8fb0fa6e8 && - assert_blob_equals "257cc5642cb1a054f08cc83f2d943e56fd3ebe99" "foo\n" + assert_blob_equals "257cc5642cb1a054f08cc83f2d943e56fd3ebe99" "foo$LF" ' test_expect_success 'read experimental-format loose objects' ' -- 1.7.6.409.ge7a85 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html