summaryrefslogtreecommitdiff
path: root/tests/header_test.sh
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/header_test.sh
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/header_test.sh')
-rw-r--r--tests/header_test.sh26
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/header_test.sh b/tests/header_test.sh
index 9fd1041..299a950 100644
--- a/tests/header_test.sh
+++ b/tests/header_test.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-# A host includes <term/term.h> and nothing else. The package puts only the
-# parent of term/ on the include path. The headers compile alone as strict
+# A host includes <wsap_vtcore/wsap_vtcore.h> and nothing else. The package puts only the
+# parent of wsap_vtcore/ on the include path. The headers compile alone as strict
# C11 and as C++.
set -euo pipefail
cd "${1:-$(dirname "$0")/..}"
@@ -22,18 +22,18 @@ check() {
fi
}
-check term.h <<'EOF'
-#include <term/term.h>
+check wsap_vtcore.h <<'EOF'
+#include <wsap_vtcore/wsap_vtcore.h>
EOF
# Apple headers define wide before a host includes the Unicode API.
check "unicode/width.h: conflicts with host types" <<'EOF'
typedef struct wide { int value; } wide;
-#include <term/unicode/width.h>
+#include <wsap_vtcore/unicode/width.h>
EOF
-# A host that uses the names the Unicode API had before the term_ and
-# TERM_ prefixes. The API must not clash with them in either order.
+# A host that uses the names the Unicode API had before the wsap_vtcore_ and
+# WSAP_VTCORE_ prefixes. The API must not clash with them in either order.
check "unicode API: host names declared first" <<'EOF'
int unicode_width(int);
static int in_ranges;
@@ -45,9 +45,9 @@ struct unicode_range { int lo; };
#define IN_TABLE 1
#define UNICODE_DATA_VERSION "host"
#define UTF_8_H
-#include <term/unicode/utf8.h>
-#include <term/unicode/width.h>
-#include <term/unicode/grapheme.h>
+#include <wsap_vtcore/unicode/utf8.h>
+#include <wsap_vtcore/unicode/width.h>
+#include <wsap_vtcore/unicode/grapheme.h>
int host_use(void)
{
return in_ranges + zero_width + utf8d + unicode_width(1) + UTF8_ACCEPT + GRAPHEME_MAX_LEN;
@@ -55,9 +55,9 @@ int host_use(void)
EOF
check "unicode API: host names declared after" <<'EOF'
-#include <term/unicode/utf8.h>
-#include <term/unicode/width.h>
-#include <term/unicode/grapheme.h>
+#include <wsap_vtcore/unicode/utf8.h>
+#include <wsap_vtcore/unicode/width.h>
+#include <wsap_vtcore/unicode/grapheme.h>
int unicode_width(int);
static int in_ranges;
#define UTF8_ACCEPT 7