File: single_title_sections.c

package info (click to toggle)
libconfuse 3.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,192 kB
  • sloc: ansic: 5,532; lex: 451; xml: 439; makefile: 213; sh: 39
file content (24 lines) | stat: -rw-r--r-- 394 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* Test sections with the CFGF_TITLE flag set but without CFGF_MULTI.
 * There's no reason this shouldn't work. Noticed by Josh Kropf.
 */

#include "check_confuse.h"

cfg_opt_t root_opts[] = {
	CFG_END()
};

cfg_opt_t opts[] = {
	CFG_SEC("root", root_opts, CFGF_TITLE),
	CFG_END()
};

int main(void)
{
	cfg_t *cfg = cfg_init(opts, CFGF_NONE);

	fail_unless(cfg);
	cfg_free(cfg);

	return 0;
}