summaryrefslogtreecommitdiff
path: root/tests/version_test.c
diff options
context:
space:
mode:
authorBerke Güzel <wenekar1@gmail.com>2026-10-15 13:04:01 +0300
committerBerke Güzel <wenekar1@gmail.com>2026-10-15 13:04:01 +0300
commitdcebf9c7f954a55350b68d0ead1935612c4e2e05 (patch)
tree3eb3e9f6154c6760bcb89a565f8ddc8f8b66cb90 /tests/version_test.c
parentbd8222e615134c3ec5e7a07b6b1fa97c9bd4a471 (diff)
Rename the library to wsap_vtcore
ncurses installs <term.h> and defines struct term. In a file that includes both headers, an ncurses TERMINAL * and this library's terminal are silently the same type. The name wsap_vtcore avoids the clash. The public header is now <wsap_vtcore/wsap_vtcore.h>. Every global symbol uses the wsap_vtcore_ prefix, every macro uses WSAP_VTCORE_, and the shared library is libwsap_vtcore.so.0. The default terminal name is now "wsap_vtcore". The ISA override variable is WSAP_VTCORE_ISA. No other behavior changes. The amalgamation writes wsap_vtcore.c and wsap_vtcore.h. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/version_test.c')
-rw-r--r--tests/version_test.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/version_test.c b/tests/version_test.c
index 0eb889e..9893e2f 100644
--- a/tests/version_test.c
+++ b/tests/version_test.c
@@ -1,27 +1,27 @@
-#include "term/term.h"
+#include "wsap_vtcore/wsap_vtcore.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
/* The project version from meson.build. The build defines it. */
-#ifndef TERM_TEST_PROJECT_VERSION
-#error "define TERM_TEST_PROJECT_VERSION as the project version, such as \"0.1.0\""
+#ifndef WSAP_VTCORE_TEST_PROJECT_VERSION
+#error "define WSAP_VTCORE_TEST_PROJECT_VERSION as the project version, such as \"0.1.0\""
#endif
int main(void)
{
char text[32];
snprintf(text, sizeof(text), "%d.%d.%d",
- TERM_VERSION_MAJOR, TERM_VERSION_MINOR, TERM_VERSION_PATCH);
- assert(!strcmp(text, TERM_TEST_PROJECT_VERSION));
+ WSAP_VTCORE_VERSION_MAJOR, WSAP_VTCORE_VERSION_MINOR, WSAP_VTCORE_VERSION_PATCH);
+ assert(!strcmp(text, WSAP_VTCORE_TEST_PROJECT_VERSION));
int major, minor, patch;
- assert(sscanf(TERM_TEST_PROJECT_VERSION, "%d.%d.%d", &major, &minor, &patch) == 3);
- assert(TERM_VERSION_CODE == TERM_VERSION(major, minor, patch));
- assert(term_version() == TERM_VERSION_CODE);
+ assert(sscanf(WSAP_VTCORE_TEST_PROJECT_VERSION, "%d.%d.%d", &major, &minor, &patch) == 3);
+ assert(WSAP_VTCORE_VERSION_CODE == WSAP_VTCORE_VERSION(major, minor, patch));
+ assert(wsap_vtcore_version() == WSAP_VTCORE_VERSION_CODE);
- assert(TERM_VERSION(0, 2, 0) > TERM_VERSION(0, 1, 255));
- assert(TERM_VERSION(1, 0, 0) > TERM_VERSION(0, 255, 255));
+ assert(WSAP_VTCORE_VERSION(0, 2, 0) > WSAP_VTCORE_VERSION(0, 1, 255));
+ assert(WSAP_VTCORE_VERSION(1, 0, 0) > WSAP_VTCORE_VERSION(0, 255, 255));
return 0;
}