From d5e75e2df9441b6c0e0c6462e8cc3ec1553af0b2 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Wed, 14 Oct 2015 11:21:30 +0200 Subject: [PATCH] test_mx_util: add test for mx_strvec --- test_mx_util.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test_mx_util.c b/test_mx_util.c index 5700e80..b4ef240 100644 --- a/test_mx_util.c +++ b/test_mx_util.c @@ -356,6 +356,15 @@ static void test_mx_strscan(void) mx_proc_pid_stat_free(&pps2); } +static void test_mx_strvec() { + char **strvec; + + strvec=mx_strvec_new(); + mx_strvec_push_str(&strvec,strdup("Hallo")); + mx_strvec_push_str(&strvec,strdup("Bla")); + mx_strvec_push_str(&strvec,strdup("lall")); + mx_strvec_free(strvec); +} int main(int argc, char *argv[]) { @@ -372,5 +381,6 @@ int main(int argc, char *argv[]) test_mx_strtobytes(); test_mx_read_first_line_from_file(); test_mx_strscan(); + test_mx_strvec(); return 0; }