esd,simple: use pa_memblockq_pop_missing()
[pulseaudio-mirror.git] / src / tests / strlist-test.c
blob10f370c206a3bbcf2f41ff038eb39168a5360bd7
1 #include <stdio.h>
3 #include <pulse/xmalloc.h>
4 #include <pulse/gccmacro.h>
6 #include <pulsecore/strlist.h>
8 int main(int argc, char* argv[]) {
9 char *t, *u;
10 pa_strlist *l = NULL;
12 l = pa_strlist_prepend(l, "e");
13 l = pa_strlist_prepend(l, "d");
14 l = pa_strlist_prepend(l, "c");
15 l = pa_strlist_prepend(l, "b");
16 l = pa_strlist_prepend(l, "a");
18 t = pa_strlist_tostring(l);
19 pa_strlist_free(l);
21 fprintf(stderr, "1: %s\n", t);
23 l = pa_strlist_parse(t);
24 pa_xfree(t);
26 t = pa_strlist_tostring(l);
27 fprintf(stderr, "2: %s\n", t);
28 pa_xfree(t);
30 l = pa_strlist_pop(l, &u);
31 fprintf(stderr, "3: %s\n", u);
32 pa_xfree(u);
34 l = pa_strlist_remove(l, "c");
36 t = pa_strlist_tostring(l);
37 fprintf(stderr, "4: %s\n", t);
38 pa_xfree(t);
40 pa_strlist_free(l);
42 return 0;