Skip to content

Commit f2d6929

Browse files
PhilipOakleydscho
authored andcommitted
hash-object: add another >4GB/LLP64 test case
To complement the `--stdin` and `--literally` test cases that verify that we can hash files larger than 4GB on 64-bit platforms using the LLP64 data model, here is a test case that exercises `hash-object` _without_ any options. Just as before, we use the `big` file from the previous test case if it exists to save on setup time, otherwise generate it. Signed-off-by: Philip Oakley <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent c2ac4da commit f2d6929

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

t/t1007-hash-object.sh

+8
Original file line numberDiff line numberDiff line change
@@ -279,4 +279,12 @@ test_expect_success EXPENSIVE,SIZE_T_IS_64BIT,!LONG_IS_64BIT \
279279
test_cmp expect actual
280280
'
281281

282+
test_expect_success EXPENSIVE,SIZE_T_IS_64BIT,!LONG_IS_64BIT \
283+
'files over 4GB hash correctly' '
284+
{ test -f big || test-tool genzeros $((5*1024*1024*1024)) >big; } &&
285+
test_oid large5GB >expect &&
286+
git hash-object -- big >actual &&
287+
test_cmp expect actual
288+
'
289+
282290
test_done

0 commit comments

Comments
 (0)