From 01f71ac7a1fc2cb2f7b29e563a3468c2ffe05313 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Mon, 27 Oct 2008 21:14:50 +0200 Subject: libpulse: add proplist_from_string --- src/tests/proplist-test.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/tests') diff --git a/src/tests/proplist-test.c b/src/tests/proplist-test.c index 20041af6..f69fa686 100644 --- a/src/tests/proplist-test.c +++ b/src/tests/proplist-test.c @@ -29,8 +29,8 @@ #include int main(int argc, char*argv[]) { - pa_proplist *a, *b; - char *s, *t; + pa_proplist *a, *b, *c; + char *s, *t, *u; a = pa_proplist_new(); pa_assert_se(pa_proplist_sets(a, PA_PROP_MEDIA_TITLE, "Brandenburgische Konzerte") == 0); @@ -50,11 +50,18 @@ int main(int argc, char*argv[]) { s = pa_proplist_to_string(a); t = pa_proplist_to_string(b); printf("---\n%s---\n%s", s, t); + + c = pa_proplist_from_string(s); + u = pa_proplist_to_string(c); + pa_assert_se(pa_streq(s, u)); + pa_xfree(s); pa_xfree(t); + pa_xfree(u); pa_proplist_free(a); pa_proplist_free(b); + pa_proplist_free(c); return 0; } -- cgit