]>
git.proxmox.com Git - libgit2.git/blob - tests/core/features.c
1 #include "clar_libgit2.h"
3 void test_core_features__0(void)
5 int major
, minor
, rev
, caps
;
7 git_libgit2_version(&major
, &minor
, &rev
);
8 cl_assert_equal_i(LIBGIT2_VER_MAJOR
, major
);
9 cl_assert_equal_i(LIBGIT2_VER_MINOR
, minor
);
10 cl_assert_equal_i(LIBGIT2_VER_REVISION
, rev
);
12 caps
= git_libgit2_features();
15 cl_assert((caps
& GIT_FEATURE_THREADS
) != 0);
17 cl_assert((caps
& GIT_FEATURE_THREADS
) == 0);
20 #if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT)
21 cl_assert((caps
& GIT_FEATURE_HTTPS
) != 0);
23 cl_assert((caps
& GIT_FEATURE_HTTPS
) == 0);
27 cl_assert((caps
& GIT_FEATURE_SSH
) != 0);
29 cl_assert((caps
& GIT_FEATURE_SSH
) == 0);
32 #if defined(GIT_USE_NSEC)
33 cl_assert((caps
& GIT_FEATURE_NSEC
) != 0);
35 cl_assert((caps
& GIT_FEATURE_NSEC
) == 0);