t5520: prevent field splitting in content comparisons
commitc998b381477953361c8bf180871ecd6b57ff94ea
authorPaul Tan <pyokagan@gmail.com>
Mon, 18 May 2015 13:32:51 +0000 (18 21:32 +0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 18 May 2015 17:33:01 +0000 (18 10:33 -0700)
tree8640cd2c8f2490d910bd79a71c507ef2ebe470aa
parentd45366e8aa922037e7e84c3f35924d2b1399a453
t5520: prevent field splitting in content comparisons

Many tests in t5520 used the following to test the contents of files:

test `cat file` = expected

or

test $(cat file) = expected

These 2 forms, however, will be affected by field splitting and,
depending on the value of $IFS, may be split into multiple arguments,
making the test fail in mysterious ways.

Replace the above 2 forms with:

test "$(cat file)" = expected

as quoting the command substitution will prevent field splitting.

Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5520-pull.sh