From e47f9f20d68eda78a6621917a7e100ae333a1a53 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Thu, 15 Oct 2026 12:29:35 +0300 Subject: Reject invalid arguments instead of ignoring them term_feed() returns bool and rejects a NULL terminal, a NULL buffer with a nonzero length, and any flag bit it does not know. Unknown bits are rejected now so that later flags can be added without changing what the old calls mean. term_new() returns NULL for a negative size component, columns above TERM_MAX_COLS, a negative scrollback, or a cursor style outside the enum. Zero still selects the default size and scrollback. It no longer clamps bad values silently. term_resize() rejects columns above TERM_MAX_COLS instead of clamping them, which matches how it already rejects a size below 1. Co-Authored-By: Claude Haiku 5.5 --- tests/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/meson.build') diff --git a/tests/meson.build b/tests/meson.build index 69f3c49..82493af 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -30,6 +30,7 @@ term_tests = [ ['term-resize-failure-test', files('resize_failure_test.c'), [dl_dep], ['extlib']], ['dcs-test', files('dcs_test.c'), [], []], ['osc-test', files('osc_test.c'), [], []], + ['api-args-test', files('api_args_test.c'), [], []], ] test_helpers_inc = include_directories('helpers') @@ -83,7 +84,7 @@ term_amalgamation_lib = static_library( foreach entry : term_tests if entry[0] in ['term-test', 'spec-test', 'view-test', 'dcs-test', 'osc-test', 'history-text-test', 'term-input-test', 'model-test', 'model-row-test', - 'resize-property-test'] + 'resize-property-test', 'api-args-test'] test(entry[0] + '-amalgamation', executable(entry[0] + '-amalgamation', entry[1], c_args: test_c_args, -- cgit v1.2.3