term: unittest: auto-scroll timer FD is created on-demand nowadays

This commit is contained in:
Daniel Eklöf 2025-05-08 10:22:45 +02:00
parent 073b637d45
commit 9b0d5e7c96
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -2769,13 +2769,11 @@ UNITTEST
},
.kind = SELECTION_NONE,
.auto_scroll = {
.fd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK),
.fd = -1,
},
},
};
xassert(term.selection.auto_scroll.fd >= 0);
#define populate_scrollback() do { \
for (int i = 0; i < scrollback_rows; i++) { \
if (term.normal.rows[i] == NULL) { \
@ -2865,7 +2863,7 @@ UNITTEST
/* Cleanup */
tll_free(term.normal.sixel_images);
close(term.selection.auto_scroll.fd);
xassert(term.selection.auto_scroll.fd == -1);
for (int i = 0; i < scrollback_rows; i++)
grid_row_free(term.normal.rows[i]);
free(term.normal.rows);