summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-07-17 11:16:53 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-07-17 11:35:04 +0200
commit4337b0afaef6bc915f8a9ffebe462a2cb9b838bf (patch)
tree567cbe7a2c03c0419e083dcbb201b1de1cc919db
parent8a07b4033e5d3c86931b3dd2ddbca41118c05c60 (diff)
downloadsystemd-4337b0afaef6bc915f8a9ffebe462a2cb9b838bf.tar.gz
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.
-rw-r--r--src/network/test-networkd-conf.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/network/test-networkd-conf.c b/src/network/test-networkd-conf.c
index 07ca127654..6883cbe1ec 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) {