mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
beef up proplist test a bit
This commit is contained in:
parent
9a27b8f0e8
commit
a6fe991716
1 changed files with 17 additions and 2 deletions
|
|
@ -29,8 +29,9 @@
|
||||||
#include <pulsecore/core-util.h>
|
#include <pulsecore/core-util.h>
|
||||||
|
|
||||||
int main(int argc, char*argv[]) {
|
int main(int argc, char*argv[]) {
|
||||||
pa_proplist *a, *b, *c;
|
pa_proplist *a, *b, *c, *d;
|
||||||
char *s, *t, *u;
|
char *s, *t, *u, *v;
|
||||||
|
const char *text;
|
||||||
|
|
||||||
a = pa_proplist_new();
|
a = pa_proplist_new();
|
||||||
pa_assert_se(pa_proplist_sets(a, PA_PROP_MEDIA_TITLE, "Brandenburgische Konzerte") == 0);
|
pa_assert_se(pa_proplist_sets(a, PA_PROP_MEDIA_TITLE, "Brandenburgische Konzerte") == 0);
|
||||||
|
|
@ -63,5 +64,19 @@ int main(int argc, char*argv[]) {
|
||||||
pa_proplist_free(b);
|
pa_proplist_free(b);
|
||||||
pa_proplist_free(c);
|
pa_proplist_free(c);
|
||||||
|
|
||||||
|
text = " eins = zwei drei = \"\\\"vier\\\"\" fuenf=sechs sieben ='\\a\\c\\h\\t\\'\\\"' neun= hex:0123456789abCDef ";
|
||||||
|
|
||||||
|
printf("%s\n", text);
|
||||||
|
d = pa_proplist_from_string(text);
|
||||||
|
v = pa_proplist_to_string(d);
|
||||||
|
pa_proplist_free(d);
|
||||||
|
printf("%s\n", v);
|
||||||
|
d = pa_proplist_from_string(v);
|
||||||
|
pa_xfree(v);
|
||||||
|
v = pa_proplist_to_string(d);
|
||||||
|
pa_proplist_free(d);
|
||||||
|
printf("%s\n", v);
|
||||||
|
pa_xfree(v);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue