summaryrefslogtreecommitdiffstats
path: root/src/tests/proplist-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/proplist-test.c')
-rw-r--r--src/tests/proplist-test.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tests/proplist-test.c b/src/tests/proplist-test.c
index 3e723561..27a0d3fe 100644
--- a/src/tests/proplist-test.c
+++ b/src/tests/proplist-test.c
@@ -27,11 +27,14 @@
#include <pulse/xmalloc.h>
#include <pulsecore/macro.h>
#include <pulsecore/core-util.h>
+#include <pulsecore/modargs.h>
int main(int argc, char*argv[]) {
+ pa_modargs *ma;
pa_proplist *a, *b, *c, *d;
char *s, *t, *u, *v;
const char *text;
+ const char *x[] = { "foo", NULL };
a = pa_proplist_new();
pa_assert_se(pa_proplist_sets(a, PA_PROP_MEDIA_TITLE, "Brandenburgische Konzerte") == 0);
@@ -78,5 +81,16 @@ int main(int argc, char*argv[]) {
printf("%s\n", v);
pa_xfree(v);
+ pa_assert_se(ma = pa_modargs_new("foo='foobar=waldo foo2=\"lj\\\\\"dhflh\" foo3=\\'kjlskj\\\\\\'\\''", x));
+ pa_assert_se(a = pa_proplist_new());
+
+ pa_assert_se(pa_modargs_get_proplist(ma, "foo", a, PA_UPDATE_REPLACE) >= 0);
+
+ printf("%s\n", v = pa_proplist_to_string(a));
+ pa_xfree(v);
+
+ pa_proplist_free(a);
+ pa_modargs_free(ma);
+
return 0;
}