3 .
"${TEST_SCRIPTS_DIR}/unit.sh"
5 conffile
="${TEST_VAR_DIR}/config.$$"
12 test_cleanup remove_files
18 conf: unknown section [section1]
23 conf: option "key1" already exists
28 conf: option "key1" already exists
37 key1 = foobar # temporary
39 key3 = false # temporary
44 conf: validation for option "key1" failed
45 conf: validation for option "key2" failed
46 conf: validation for option "key3" failed
50 cat > "$conffile" <<EOF
54 required_result
22 <<EOF
55 conf: validation for section [section1] failed
59 unit_test conf_test
8 "$conffile"
61 cat > "$conffile" <<EOF
66 required_result
22 <<EOF
67 conf: validation for section [section1] failed
71 unit_test conf_test
8 "$conffile"
73 cat > "$conffile" <<EOF
87 unit_test conf_test
9 "$conffile"
89 cat > "$conffile" <<EOF
100 unit_test conf_test
9 "$conffile"
102 cat > "$conffile" <<EOF
107 required_result
22 <<EOF
108 conf: unknown section [section2]
109 conf: unknown section for option "foo"
113 key3 = false # temporary
115 unit_test conf_test
10 "$conffile"
117 cat > "$conffile" <<EOF
124 required_error EINVAL
<<EOF
125 conf: unknown option [section1] -> "foo"
129 key3 = false # temporary
131 unit_test conf_test
10 "$conffile"
133 cat > "$conffile" <<EOF
140 touch "${conffile}.reload"
148 unit_test conf_test
11 "$conffile"
150 cat > "$conffile" <<EOF
157 cat > "${conffile}.reload" <<EOF
168 unit_test conf_test
11 "$conffile"