]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-networkd-conf: add missing assert
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 17 Jul 2019 09:16:53 +0000 (11:16 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 17 Jul 2019 09:35:04 +0000 (11:35 +0200)
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

index 07ca127654ff8ac36f3b399f278e52e821885694..6883cbe1ec3bf1f7e759fd1b2b65db2c8de814f8 100644 (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) {