t4211: add test cases for SHA-256

There are already files containing example output for SHA-1.  Add test
files providing example output for SHA-256 as well and adjust the test
to look up the appropriate ones based on the algorithm in use.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
brian m. carlson
2020-02-07 00:52:42 +00:00
committed by Junio C Hamano
parent f743e8f5b3
commit dfa5f53e78
14 changed files with 1263 additions and 1 deletions

View File

@ -4,6 +4,7 @@ test_description='test log -L'
. ./test-lib.sh
test_expect_success 'setup (import history)' '
test_oid_init &&
git fast-import < "$TEST_DIRECTORY"/t4211/history.export &&
git reset --hard
'
@ -11,7 +12,7 @@ test_expect_success 'setup (import history)' '
canned_test_1 () {
test_expect_$1 "$2" "
git log $2 >actual &&
test_cmp \"\$TEST_DIRECTORY\"/t4211/sha1/expect.$3 actual
test_cmp \"\$TEST_DIRECTORY\"/t4211/$(test_oid algo)/expect.$3 actual
"
}