Skip to content

Commit dcd7130

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 2b5ec28 commit dcd7130

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
@@ -268,4 +268,12 @@ test_expect_success EXPENSIVE,SIZE_T_IS_64BIT,!LONG_IS_64BIT \
268268
test_cmp expect actual
269269
'
270270

271+
test_expect_success EXPENSIVE,SIZE_T_IS_64BIT,!LONG_IS_64BIT \
272+
'files over 4GB hash correctly' '
273+
{ test -f big || test-tool genzeros $((5*1024*1024*1024)) >big; } &&
274+
test_oid large5GB >expect &&
275+
git hash-object -- big >actual &&
276+
test_cmp expect actual
277+
'
278+
271279
test_done

0 commit comments

Comments
 (0)