version 1.1.1.1, 2017/01/24 14:48:56
|
version 1.1.1.2, 2021/03/17 00:49:17
|
Line 8
|
Line 8
|
cfg_opt_t sec_opts[] = { |
cfg_opt_t sec_opts[] = { |
CFG_INT("a", 1, CFGF_NONE), |
CFG_INT("a", 1, CFGF_NONE), |
CFG_INT("b", 2, CFGF_NONE), |
CFG_INT("b", 2, CFGF_NONE), |
|
CFG_STR_LIST("list", "{}", CFGF_NONE), |
CFG_END() |
CFG_END() |
}; |
}; |
|
|
Line 17 cfg_opt_t opts[] = {
|
Line 18 cfg_opt_t opts[] = {
|
CFG_END() |
CFG_END() |
}; |
}; |
|
|
int | int main(void) |
main(void) | |
{ |
{ |
char *buf = "include (\"a.conf\")\n"; | char *buf = "include (\"" SRC_DIR "/a.conf\")\n"; |
cfg_t *cfg = cfg_init(opts, CFGF_NONE); |
cfg_t *cfg = cfg_init(opts, CFGF_NONE); |
|
|
fail_unless(cfg); |
fail_unless(cfg); |
fail_unless(cfg_parse_buf(cfg, buf) == CFG_SUCCESS); |
fail_unless(cfg_parse_buf(cfg, buf) == CFG_SUCCESS); |
fail_unless(cfg_size(cfg, "sec") == 1); |
fail_unless(cfg_size(cfg, "sec") == 1); |
Line 31 main(void)
|
Line 32 main(void)
|
|
|
return 0; |
return 0; |
} |
} |
|
|