From b86ae58a37b26ac501076d2594b514e33e97e11e Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 23 Sep 2026 21:07:56 +0200 Subject: Add version testing functionality and bump to version 1.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- librecrypt_version.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 librecrypt_version.c (limited to 'librecrypt_version.c') diff --git a/librecrypt_version.c b/librecrypt_version.c new file mode 100644 index 0000000..c5be2e1 --- /dev/null +++ b/librecrypt_version.c @@ -0,0 +1,32 @@ +/* See LICENSE file for copyright and license details. */ +#include "common.h" +#ifndef TEST + + +const int librecrypt_version_major = LIBRECRYPT_VERSION_MAJOR; +const int librecrypt_version_minor = LIBRECRYPT_VERSION_MINOR; +const int librecrypt_version_patch = LIBRECRYPT_VERSION_PATCH; + + +#else + + +int +main(void) +{ + SET_UP_ALARM(); + INIT_RESOURCE_TEST(); + + EXPECT(librecrypt_version_major == LIB_MAJOR); + EXPECT(librecrypt_version_minor == LIB_MINOR); + EXPECT(librecrypt_version_patch == LIB_PATCH); + EXPECT(LIBRECRYPT_VERSION_MAJOR == LIB_MAJOR); + EXPECT(LIBRECRYPT_VERSION_MINOR == LIB_MINOR); + EXPECT(LIBRECRYPT_VERSION_PATCH == LIB_PATCH); + + STOP_RESOURCE_TEST(); + return 0; +} + + +#endif -- cgit v1.3.1