c) } */
key = line;
if (*key == '"') {
+ config_line_r->key_quoted = TRUE;
key++; line++;
while (*line != '\0') {
if (*line == '\\' && line[1] != '\0')
if (config_write_value(ctx, line) < 0) {
if (config_apply_error(ctx, line->key) < 0)
break;
- } else if (line->key[0] == SETTINGS_INCLUDE_GROUP_PREFIX) {
+ } else if (line->key[0] == SETTINGS_INCLUDE_GROUP_PREFIX &&
+ !line->key_quoted) {
if (config_filter_has_include_group(&ctx->cur_section->filter_parser->filter)) {
ctx->error = "Recursive include groups not allowed";
break;
const char *env_key4;
const char *env_key5;
const char *protocols;
+ const char *at_group_name;
};
static const struct setting_define test_settings_defs[] = {
SETTING_DEFINE_STRUCT_STR("env_key4", env_key4, struct test_settings),
SETTING_DEFINE_STRUCT_STR("env_key5", env_key5, struct test_settings),
SETTING_DEFINE_STRUCT_STR("protocols", protocols, struct test_settings),
+ SETTING_DEFINE_STRUCT_STR("@group_name", at_group_name, struct test_settings),
SETTING_DEFINE_LIST_END
};
.env_key4 = "",
.env_key5 = "",
.protocols = "pop3",
+ .at_group_name = "",
};
const struct setting_parser_info test_settings_info = {
"env_key4 = $ENV:foo $ENV:bar $SET:key\n"
"env_key5 = $ENV:foo $ENV:foo\n"
"protocols = $SET:protocols imap\n"
+"\"@group_name\" = value\n"
);
putenv("foo=test1");
test_assert_strcmp(set->env_key4, "test1 test2 value");
test_assert_strcmp(set->env_key5, "test1 test1");
test_assert_strcmp(set->protocols, "pop3 imap");
+ test_assert_strcmp(set->at_group_name, "value");
settings_parser_unref(&set_parser);
config_parsed_free(&config);
test_assert_strcmp(set->env_key4, "$ENV:foo $ENV:bar $SET:key");
test_assert_strcmp(set->env_key5, "$ENV:foo $ENV:foo");
test_assert_strcmp(set->protocols, "pop3 imap");
+ test_assert_strcmp(set->at_group_name, "value");
settings_parser_unref(&set_parser);
config_parsed_free(&config);