Skip to content

Commit 75551ae

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 a3aa580 commit 75551ae

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
@@ -285,4 +285,12 @@ test_expect_success EXPENSIVE,SIZE_T_IS_64BIT,!LONG_IS_64BIT \
285285
test_cmp expect actual
286286
'
287287

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

0 commit comments

Comments
 (0)