summaryrefslogtreecommitdiff
path: root/tests/snapshot_scroll_arena_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/snapshot_scroll_arena_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/snapshot_scroll_arena_test.c')
-rw-r--r--tests/snapshot_scroll_arena_test.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/snapshot_scroll_arena_test.c b/tests/snapshot_scroll_arena_test.c
index 7da6507..8e20aae 100644
--- a/tests/snapshot_scroll_arena_test.c
+++ b/tests/snapshot_scroll_arena_test.c
@@ -7,23 +7,23 @@
int main(void)
{
- struct term_options options = { .size = { 8, 24 }, .scrollback = 5 };
- struct term *t = term_new(&options);
- struct term_snapshot *s = term_snapshot_new();
- assert(t && s && term_snapshot_update(s, t));
+ struct wsap_vtcore_options options = { .size = { 8, 24 }, .scrollback = 5 };
+ struct wsap_vtcore *t = wsap_vtcore_new(&options);
+ struct wsap_vtcore_snapshot *s = wsap_vtcore_snapshot_new();
+ assert(t && s && wsap_vtcore_snapshot_update(s, t));
const char line[] = "e\xcc\x81\r\n";
for (int i = 0; i < 10000; i++) {
- term_feed(t, line, sizeof(line) - 1, 0);
- assert(term_snapshot_update(s, t));
+ wsap_vtcore_feed(t, line, sizeof(line) - 1, 0);
+ assert(wsap_vtcore_snapshot_update(s, t));
}
/* A fixed viewport holds fewer than 24 * 8 cluster records at once.
* Dead records are compacted before they can dominate this arena. */
- assert(term_history_rows(t) == 5);
+ assert(wsap_vtcore_history_rows(t) == 5);
assert(s->arena_len < 8192);
- term_snapshot_free(s);
- term_free(t);
+ wsap_vtcore_snapshot_free(s);
+ wsap_vtcore_free(t);
return 0;
}