test-lib-functions.sh: add test_diff that uses git diff --no-index
commitcaed24ae3797438375bae75e24129e3a2dace311
authorKyle J. McKay <mackyle@gmail.com>
Tue, 13 Jun 2017 00:41:46 +0000 (12 17:41 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Tue, 13 Jun 2017 00:41:46 +0000 (12 17:41 -0700)
tree0443892439a7594e17caece14e6995db30bba4b3
parente73c961e4842c24bc3eae4f1b918f2c719b85687
test-lib-functions.sh: add test_diff that uses git diff --no-index

The standard "test_cmp" function cannot be relied upon to provide
unified diff output everywhere since not all diffs support -u.

Always use "git diff --no-index" (and a few supporting options)
to get a consistent unified diff that's deterministic to boot.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
t/README-TESTLIB
t/test-lib-functions.sh