Check the version against the one of the build

The version test compared against a hard coded 1.4.0, so it fails whenever the
version is bumped, as it did for 1.5.0. It uses PROJECT_VERSION now, so that a
bump no longer has to be repeated here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Change-Id: I6d2632f1b2dc6fe8c1052ab7a377f09e78b16a31
diff --git a/tests/basic_test.c b/tests/basic_test.c
index d6d236e..7f33b59 100644
--- a/tests/basic_test.c
+++ b/tests/basic_test.c
@@ -5,6 +5,7 @@
 #include <ftw.h>
 #include "../src/collocatordb.h"
 #include "acutest.h"
+#include "config.h"
 
 char dbpath[] = "../tests/data/wpd19_10000";
 const int testword = 10; // ist
@@ -115,8 +116,10 @@
 
 void test_version_function() {
   char *version = get_version();
-  TEST_CHECK(strcmp(version, "1.4.0") == 0);
-  TEST_MSG("Unexpected version: %s", version);
+  /* against the version of the build, so that a version bump does not have to
+     be repeated here */
+  TEST_CHECK(strcmp(version, PROJECT_VERSION) == 0);
+  TEST_MSG("Unexpected version: %s, expected %s", version, PROJECT_VERSION);
 }
 
 void test_get_word_id() {