summaryrefslogtreecommitdiff
path: root/src/test/test-strv.c
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2016-04-14 10:14:41 +0200
committerMartin Pitt <martin.pitt@ubuntu.com>2016-04-14 10:14:41 +0200
commit8fae819099a189f03213ee657f44545c1b035f7e (patch)
treea398d2aea2046ae90f149288f9df9befc8d7e4fb /src/test/test-strv.c
parent43bbb8f005177bcad135ec894419361f0f420034 (diff)
parent78df0edc1b594017b1d3493eb2033d8a92d9d43f (diff)
Merge pull request #3033 from keszybz/code-cleanups
Code cleanups
Diffstat (limited to 'src/test/test-strv.c')
-rw-r--r--src/test/test-strv.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/test/test-strv.c b/src/test/test-strv.c
index fea1f848cd..fc01dcfaf1 100644
--- a/src/test/test-strv.c
+++ b/src/test/test-strv.c
@@ -358,7 +358,7 @@ static void test_strv_extend_strv_concat(void) {
}
static void test_strv_extend_strv(void) {
- _cleanup_strv_free_ char **a = NULL, **b = NULL;
+ _cleanup_strv_free_ char **a = NULL, **b = NULL, **n = NULL;
a = strv_new("abc", "def", "ghi", NULL);
b = strv_new("jkl", "mno", "abc", "pqr", NULL);
@@ -373,8 +373,14 @@ static void test_strv_extend_strv(void) {
assert_se(streq(a[3], "jkl"));
assert_se(streq(a[4], "mno"));
assert_se(streq(a[5], "pqr"));
-
assert_se(strv_length(a) == 6);
+
+ assert_se(strv_extend_strv(&n, b, false) >= 0);
+ assert_se(streq(n[0], "jkl"));
+ assert_se(streq(n[1], "mno"));
+ assert_se(streq(n[2], "abc"));
+ assert_se(streq(n[3], "pqr"));
+ assert_se(strv_length(n) == 4);
}
static void test_strv_extend(void) {