From b1cda80b86f88d1f3e334632147152fe374cb1e2 Mon Sep 17 00:00:00 2001 From: Robert Spalek Date: Sat, 22 Apr 2006 17:32:26 +0200 Subject: [PATCH] conf2-test: add a simple tester configuration file --- lib/conf2-test.c | 3 ++- lib/conf2.t | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 lib/conf2.t diff --git a/lib/conf2-test.c b/lib/conf2-test.c index 21326f05..1d164f10 100644 --- a/lib/conf2-test.c +++ b/lib/conf2-test.c @@ -104,7 +104,7 @@ static struct cf_section cf_top = { CF_INT_DYN("nrs1", &nrs1, 1000), CF_INT_ARY("nrs2", nrs2, 5), CF_STRING("str1", &str1), - CF_STRING_DYN("str2", &str2, 2), + CF_STRING_DYN("str2", &str2, 20), CF_U64("u1", &u1), CF_DOUBLE("d1", &d1), CF_PARSER("FirstTime", &t1, time_parser, -1), @@ -142,6 +142,7 @@ main(int argc, char *argv[]) { log_init(argv[0]); cf_declare_section("top", &cf_top, 0); + cf_def_file = "lib/conf2.t"; int opt; while ((opt = cf_get_opt(argc, argv, short_opts, long_opts, NULL)) >= 0) diff --git a/lib/conf2.t b/lib/conf2.t new file mode 100644 index 00000000..bbf16edd --- /dev/null +++ b/lib/conf2.t @@ -0,0 +1,25 @@ +# test config file +Top { + nr1=16 + nrs1 2 3 5 \ + 7 11 13 \ + \ + 17M + nrs2 3 3k 3 3 3 + str1 "hello, world\n" + str2 'Hagenuk, + the best' "\ + " qu'est-ce que c'est? + u1 0xbadcafebadbeefc0 + #d1 -1.14e-25 + d1 7% + firsttime + secondtime 56 + ^top.master:set alice HB8+ + slaves:clear +} + +unknown.ignored :-) + +top.slaves cairns gpua 7 7 -0.1 +0.1 +top.slaves daintree rafc 4 5 -17.1e1 -- 2.39.2