From: Zbigniew Jędrzejewski-Szmek Date: Wed, 17 Jul 2019 09:16:53 +0000 (+0200) Subject: test-networkd-conf: add missing assert X-Git-Tag: v243-rc1~98^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4337b0afaef6bc915f8a9ffebe462a2cb9b838bf;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/network/test-networkd-conf.c b/src/network/test-networkd-conf.c index 07ca127654f..6883cbe1ec3 100644 --- a/src/network/test-networkd-conf.c +++ b/src/network/test-networkd-conf.c @@ -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) {