mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user