summaryrefslogtreecommitdiff
path: root/t/test-lib.sh
diff options
context:
space:
mode:
authorCarlo Marcelo Arenas Belón <carenas@gmail.com>2021-11-02 15:46:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-11-03 18:22:26 (GMT)
commit970fa57f768a276bddbc4bd1450bb1c3feb20f2b (patch)
tree0c2c1178f75bf803617fee72d6f9b5ea8d2ccf56 /t/test-lib.sh
parentdf7000cd910a5f6991f73991b87d838a5d75e2fc (diff)
downloadgit-970fa57f768a276bddbc4bd1450bb1c3feb20f2b.zip
git-970fa57f768a276bddbc4bd1450bb1c3feb20f2b.tar.gz
git-970fa57f768a276bddbc4bd1450bb1c3feb20f2b.tar.bz2
test-lib: add prerequisite for 64-bit platforms
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 <carenas@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index adaf035..af1a94c 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1642,6 +1642,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)"
'