Skip to content

Commit 93c471b

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 e712f83 commit 93c471b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

t/t1007-hash-object.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,4 +284,12 @@ test_expect_success EXPENSIVE,SIZE_T_IS_64BIT,!LONG_IS_64BIT \
284284
test_cmp expect actual
285285
'
286286

287+
test_expect_success EXPENSIVE,SIZE_T_IS_64BIT,!LONG_IS_64BIT \
288+
'files over 4GB hash correctly' '
289+
{ test -f big || test-tool genzeros $((5*1024*1024*1024)) >big; } &&
290+
test_oid large5GB >expect &&
291+
git hash-object -- big >actual &&
292+
test_cmp expect actual
293+
'
294+
287295
test_done

0 commit comments

Comments
 (0)