diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-15 13:04:32 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-15 13:04:32 +0300 |
| commit | bdaedce69b17b654bd0060579dd9b9ff120009b5 (patch) | |
| tree | 0e9cd8597652263a96c48ba678fb0b66e1fc131b /tests/resize_failure_test.c | |
| parent | ba75c8b0a1bba03ad92c53375432f122ddb4cb98 (diff) | |
| parent | dcebf9c7f954a55350b68d0ead1935612c4e2e05 (diff) | |
Merge branch 'wt/rename' into api-hardening
# Conflicts:
# README.md
Diffstat (limited to 'tests/resize_failure_test.c')
| -rw-r--r-- | tests/resize_failure_test.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/resize_failure_test.c b/tests/resize_failure_test.c index fbfa38d..0074f56 100644 --- a/tests/resize_failure_test.c +++ b/tests/resize_failure_test.c @@ -52,7 +52,7 @@ int main(void) puts("resize failure test skipped under sanitizer"); return 0; #else - struct term *term = tt_new(10, 2); + struct wsap_vtcore *term = tt_new(10, 2); assert(term); tt_write(term, "abc", 3); @@ -79,7 +79,7 @@ int main(void) assert(tt_cols(term) == 20); assert(tt_rows(term) == 2); assert(tt_cell(term, 0, 0)->text == '1'); - term_free(term); + wsap_vtcore_free(term); term = tt_new(10, 3); assert(term); @@ -96,7 +96,7 @@ int main(void) assert(tt_cell(term, 4, 0)->text == 'e'); assert(tt_cell(term, 5, 0)->text != 'f'); assert(tt_cell(term, 0, 1)->text == 'f'); - term_free(term); + wsap_vtcore_free(term); term = tt_new(10, 2); assert(term); @@ -106,12 +106,12 @@ int main(void) assert(!fail_next_calloc); /* A failed alternate-screen allocation keeps the normal screen active. */ - assert(!term_modes(term).alternate); + assert(!wsap_vtcore_modes(term).alternate); assert(tt_cell(term, 0, 0)->text == 'n'); assert(tt_cell(term, 5, 0)->text == 'l'); tt_write(term, "\033[?1049l", 8); assert(tt_cell(term, 0, 0)->text == 'n'); - term_free(term); + wsap_vtcore_free(term); /* A reflow that cannot grow its row buffers fails before it changes the * history, so the old geometry and text survive the failed resize. The @@ -144,7 +144,7 @@ int main(void) resized = tt_resize(term, 10, 40); assert(resized); assert(tt_cols(term) == 10); - term_free(term); + wsap_vtcore_free(term); /* A failed same-width height shrink must not scroll rows into history or * move the cursor. The same resize must succeed when allocation recovers. */ @@ -174,14 +174,14 @@ int main(void) assert(tt_cell(term, 0, 1)->text == 'D'); assert(tt_cursor_y(term) == 1); assert(tt_history(term) == 2); - term_free(term); + wsap_vtcore_free(term); /* The alternate screen uses the same allocation-before-scroll path. */ term = tt_new(8, 4); assert(term); tt_write(term, "\033[?1049h", 8); tt_write(term, four_rows, sizeof four_rows - 1); - assert(term_modes(term).alternate); + assert(wsap_vtcore_modes(term).alternate); assert(tt_cursor_y(term) == 3); fail_next_calloc = true; resized = tt_resize(term, 8, 2); @@ -195,7 +195,7 @@ int main(void) assert(tt_rows(term) == 2 && tt_cursor_y(term) == 1); assert(tt_cell(term, 0, 0)->text == 'C'); assert(tt_cell(term, 0, 1)->text == 'D'); - term_free(term); + wsap_vtcore_free(term); puts("lazy screen allocation failures preserve observable terminal state"); return 0; |
