aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2024-12-21 05:52:00 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-12-22 06:16:12 +0000
commite38ec79be15fe355bf50670bc9066210ae0ed211 (patch)
tree9abd0d14ba98bfd2a910d852affa5130522e0287 /tests
parentselection: fix crash when tripple clicking in a region containing NUL characters (diff)
osc: add option to disable OSC-52, partially or fully
Closes #1867
Diffstat (limited to 'tests')
-rw-r--r--tests/test-config.c17
1 files changed, 17 insertions, 0 deletions
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
@@ -554,6 +554,22 @@ test_section_main(void)
}
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)
{
struct config conf = {0};
@@ -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();