aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2025-01-30 10:58:52 +0000
committerDaniel Eklöf <daniel@ekloef.se>2025-02-05 12:35:17 +0000
commite76d8dd7af0cd7b6b2e1b5ed9c395bd75f503e61 (patch)
tree291fde6dc276fcdb3df2d826d21776f4f794417c /tests
parenturl-mode: wip: regex: tweak debug log message (diff)
config: remove url.{uri-characters,protocols}
Diffstat (limited to 'tests')
-rw-r--r--tests/test-config.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/tests/test-config.c b/tests/test-config.c
index 303ddd6f..37cf4f22 100644
--- a/tests/test-config.c
+++ b/tests/test-config.c
@@ -107,50 +107,6 @@ test_c32string(struct context *ctx, bool (*parse_fun)(struct context *ctx),
}
static void
-test_protocols(struct context *ctx, bool (*parse_fun)(struct context *ctx),
- const char *key, char32_t **const *ptr)
-{
- ctx->key = key;
-
- static const struct {
- const char *option_string;
- int count;
- const char32_t *value[2];
- bool invalid;
- } input[] = {
- {""},
- {"http", 1, {U"http://"}},
- {" http", 1, {U"http://"}},
- {"http, https", 2, {U"http://", U"https://"}},
- {"longprotocolislong", 1, {U"longprotocolislong://"}},
- };
-
- for (size_t i = 0; i < ALEN(input); i++) {
- ctx->value = input[i].option_string;
-
- if (input[i].invalid) {
- if (parse_fun(ctx)) {
- BUG("[%s].%s=%s: did not fail to parse as expected",
- ctx->section, ctx->key, &ctx->value[0]);
- }
- } else {
- if (!parse_fun(ctx)) {
- BUG("[%s].%s=%s: failed to parse",
- ctx->section, ctx->key, &ctx->value[0]);
- }
- for (int c = 0; c < input[i].count; c++) {
- if (c32cmp((*ptr)[c], input[i].value[c]) != 0) {
- BUG("[%s].%s=%s: set value[%d] (%ls) not the expected one (%ls)",
- ctx->section, ctx->key, &ctx->value[c], c,
- (const wchar_t *)(*ptr)[c],
- (const wchar_t *)input[i].value[c]);
- }
- }
- }
- }
-}
-
-static void
test_boolean(struct context *ctx, bool (*parse_fun)(struct context *ctx),
const char *key, const bool *ptr)
{
@@ -647,9 +603,6 @@ test_section_url(void)
(int []){OSC8_UNDERLINE_URL_MODE, OSC8_UNDERLINE_ALWAYS},
(int *)&conf.url.osc8_underline);
test_c32string(&ctx, &parse_section_url, "label-letters", &conf.url.label_letters);
- test_protocols(&ctx, &parse_section_url, "protocols", &conf.url.protocols);
-
- /* TODO: uri-characters (wchar string, but sorted) */
config_free(&conf);
}