From e38ec79be15fe355bf50670bc9066210ae0ed211 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 21 Dec 2024 06:52:00 +0100 Subject: osc: add option to disable OSC-52, partially or fully Closes #1867 --- tests/test-config.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests') diff --git a/tests/test-config.c b/tests/test-config.c index 61999686..a189d440 100644 --- a/tests/test-config.c +++ b/tests/test-config.c @@ -553,6 +553,22 @@ test_section_main(void) config_free(&conf); } +static void +test_section_security(void) +{ + struct config conf = {0}; + struct context ctx = {.conf = &conf, .section = "security", .path = "unittest"}; + + test_invalid_key(&ctx, &parse_section_security, "invalid-key"); + test_enum( + &ctx, &parse_section_security, "osc52", 4, + (const char*[]){"disabled", "copy-enabled", "paste-enabled", "enabled"}, + (int []){OSC52_DISABLED, OSC52_COPY_ENABLED, OSC52_PASTE_ENABLED, OSC52_ENABLED}, + (int *)&conf.security.osc52); + + config_free(&conf); +} + static void test_section_bell(void) { @@ -1407,6 +1423,7 @@ main(int argc, const char *const *argv) FcInit(); log_init(LOG_COLORIZE_AUTO, false, 0, LOG_CLASS_ERROR); test_section_main(); + test_section_security(); test_section_bell(); test_section_desktop_notifications(); test_section_scrollback(); -- cgit v1.3