OSDN Git Service

t8005: avoid grep on non-ASCII data
authorJohn Keeping <john@keeping.me.uk>
Sun, 21 Feb 2016 17:32:21 +0000 (17:32 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 23 Feb 2016 23:00:12 +0000 (15:00 -0800)
commit0be43dedbc03139b9d9d0bc71deefc4d7f47296d
tree93257b5be7adf890d0c52ba55f1484f216339d7b
parenta2558fb8e1e387b630312311e1d22c95663da5d0
t8005: avoid grep on non-ASCII data

GNU grep 2.23 detects the input used in this test as binary data so it
does not work for extracting lines from a file.  We could add the "-a"
option to force grep to treat the input as text, but not all
implementations support that.  Instead, use sed to extract the desired
lines since it will always treat its input as text.

While touching these lines, modernize the test style to avoid hiding the
exit status of "git blame" and remove a space following a redirection
operator.  Also swap the order of the expected and actual output
files given to test_cmp; we compare expect and actual to show how
actual output differs from what is expected.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t8005-blame-i18n.sh