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