summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2008-10-27 21:14:50 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2009-01-13 16:59:46 +0200
commit01f71ac7a1fc2cb2f7b29e563a3468c2ffe05313 (patch)
tree1526f9ef934123cdbafe16469cbf84190ab80a8f /src/tests
parent9e978c97702ef199764671b68def5c0e42a32250 (diff)
libpulse: add proplist_from_string
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/proplist-test.c11
1 files changed, 9 insertions, 2 deletions
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 <pulsecore/core-util.h>
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;
}