test-networkd-conf: add missing assert

The test would not pass before, because EXTRACT_UNQUOTE|EXTRACT_RETAIN_ESCAPE
didn't work (we'd get "KEY3=val with \\quotation\\" as the last string. Now we
are only doing EXTRACT_UNQUOTE, so we get the expected "KEY3=val with \"quotation\"".

Coverity CID#1402781.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2019-07-17 11:16:53 +02:00
parent 8a07b4033e
commit 4337b0afae

View File

@@ -233,7 +233,14 @@ static void test_config_parse_match_strv(void) {
assert_se(config_parse_match_strv("network", "filename", 1, "section", 1, "Name", 0,
"KEY=val \"KEY2=val with space\" \"KEY3=val with \\\"quotation\\\"\"", &names, NULL) == 0);
strv_equal(names, STRV_MAKE("!hoge", "!hogehoge", "!foo", "!baz", "KEY=val", "KEY2=val with space", "KEY3=val with \"quotation\""));
assert_se(strv_equal(names,
STRV_MAKE("!hoge",
"!hogehoge",
"!foo",
"!baz",
"KEY=val",
"KEY2=val with space",
"KEY3=val with \"quotation\"")));
}
int main(int argc, char **argv) {