From 4337b0afaef6bc915f8a9ffebe462a2cb9b838bf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 17 Jul 2019 11:16:53 +0200 Subject: [PATCH] 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. --- src/network/test-networkd-conf.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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) { -- 2.47.3