]> git.99rst.org Git - git.git/commitdiff
test-lib: add prerequisite for 64-bit platforms
authorCarlo Marcelo Arenas Belón <redacted>
Tue, 2 Nov 2021 15:46:06 +0000 (15:46 +0000)
committerJunio C Hamano <redacted>
Fri, 9 Dec 2022 05:26:04 +0000 (14:26 +0900)
Allow tests that assume a 64-bit `size_t` to be skipped in 32-bit
platforms and regardless of the size of `long`.

This imitates the `LONG_IS_64BIT` prerequisite.

Signed-off-by: Carlo Marcelo Arenas Belón <redacted>
Signed-off-by: Johannes Schindelin <redacted>
Signed-off-by: Junio C Hamano <redacted>
t/test-lib.sh

index 9fa7c1d0f6d1c8c23642a7bc81ad4fb2f8a82275..7d6e0f89d13d8dcd360a53e54f841065881fd758 100644 (file)
@@ -1686,6 +1686,10 @@ build_option () {
        sed -ne "s/^$1: //p"
 }
 
+test_lazy_prereq SIZE_T_IS_64BIT '
+       test 8 -eq "$(build_option sizeof-size_t)"
+'
+
 test_lazy_prereq LONG_IS_64BIT '
        test 8 -le "$(build_option sizeof-long)"
 '
git clone https://git.99rst.org/PROJECT